Put in order · JavaScript and React course · Module 5: useEffect and Custom Hooks
useCallback Syntax with a Handler
Arrange the correct useCallback syntax for an event handler:
Items to put in order
- [id, onClick]
- );
- const handleClick = useCallback(() =>
- { onClick(id); },
You can check the correct answer by solving this task in the CodeWorlds game.