next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
Questions
3 of 5
1
How do we handle events in react.
2
What are syntheticEvent?
3
How to pass a parameter to an event handler or callback?
4
How can you prevent the default behavior of an event in React?
5
Describe how events are handled in React.
react
Basics
JSX
Virtual DOM
Reconciliation
State and Props
Components
Class Components
Function Components
Lifecycle functions
Code Sharing
Hooks
useState
useReducer
useMemo
useContext
useCallback
useEffect
Custom Hooks
New Hooks
HOC
Refs
Data Sharing
Events
Context API
Redux
Router
CSR-SSR
React APIs
Performance Optimisation
ReactDOM
Strict Mode
Security
Questions
All Topics
A-
Reset
A+
03 / 05
How to pass a parameter to an event handler or callback?
You can use an arrow function to wrap around an event handler and pass parameters:
Copy
This is equivalent to calling .bind as below:
Copy
Suggest Improvement