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 ...
Front end developer @ Mojang, I teach people TypeScript and React
Markdown supported · ⌘↵ to post
No responses yet.