How to add events in saved block
-
I have this component
class CallToAction extends Component { handleChange() { console.log('changed'); } render() { return ( <input type="text" value={ this.props.cta } onChange={ this.handleChange }/> ); } }
When I include it in the edit: method of my block, the onChange fires and logs ‘changed’ as expected
When I include it in the save: method of my block, it does not work.
- The topic ‘How to add events in saved block’ is closed to new replies.