Web Development
React.js
Subjective
Sep 28, 2025
What is event handling in React?
Detailed Explanation
Event handling in React uses SyntheticEvents, which are React's wrapper around native events. Events use camelCase naming and functions are passed as event handlers.
function Button() {
const handleClick = (e) => {
e.preventDefault();
console.log("Button clicked!");
};
return <button onClick={handleClick}>Click me</button>;
}Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts