React events
Events in React can be created through ‘inline-style’. Inside the JSX element that triggers the event. That means that there are many attribute names, one for every event, some of the most common used are:
onClick
onMouseOver
onChange
onSubmit
The pattern is that we type on and the name of the event together, in a camelCase syntax! Then the value can be a javascript expression inside {} curly braces. Most of the times you will call a specific function there. Let’s take a look at the example above.
The button that is rendered from the component has an event attached to it. When clicked, executes the function with the name handleClick, because this function has not been declared globally but inside the class, the this keyword must come before. That indicates that we are talking about a function that is declared inside the same class with the button and not a global function.
But what is this bind function that lies next to it?