event param missing from useKeyBindings callback type #609
-
Thank you for creating Rooks, it's pretty awesome! I started using useKeyBindings in a project, and I need to call preventDefault on the key event in my callback, which TypeScript complained about, since the type declaration for the callback is () => void . I wonder if this is on purpose and I will somehow shoot myself in the foot for trying to call preventDefault on the event within useKeyBindings hook callback, or if I should create a pull request to add the appropriate optional parameter type? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is most definitely something we didn't really do because we haven't really used it for such a scenario so far. But it is definitely useful and the hook should have it. Would you mind doing a PR on it @brahambence ? |
Beta Was this translation helpful? Give feedback.
This is most definitely something we didn't really do because we haven't really used it for such a scenario so far. But it is definitely useful and the hook should have it.
Would you mind doing a PR on it @brahambence ?