I need to set a state field which I get from an event, but it doesn\'t get set when I pass a function to it. The component and method looks like the following:
To resolve this issue - before calling handleSubmit of form, call event.persist() and then in handleSubmit() definition - write your logic. For e.g.
{event.persist();this.handleSubmit(event)}}> handleSubmit(event){ // use event.currentTarget - It will be visible here }