DEV Community

Discussion on: Let's talk React - How to use a Custom Hook multiple times

Collapse
 
mp3846 profile image
Mostafa Pourmorad • Edited

Great!
What about a custom hook which doesn't return anything?
For example a useShortcutKeys hook for passing a callback after user pressed some key combinations
I have tried to use it two times in a component but the second one overrides first one!