Define a instance method to handle the event
Note: react events are named using camelCase
An event handler will always be invoked function style
To utilize the this
keyword, we must either bind the event handler in the constructor or define the event handler as an arrow function. Pick one and be consistent.
event.preventDefault()
in our event handler.Ex: