Handling Events In ReactJS
Handling events in ReactJS is very similar to how it’s done on DOM elements. There are a few differences though.
Event names are camelCased, so instead of onclick you have to use onClick:
<button onclick="toggleDropdown()">Categories</button>
// DOM ...
ivanov.hashnode.dev2 min read