Fork me on GitHub
#reagent
<
2022-01-12
>
Mitul Shah20:01:31

hi! does anyone have examples of how to use custom react hooks in reagent? here are some example libraries i’d like to use: https://github.com/joshwcomeau/use-sound https://github.com/JohannesKlauss/react-hotkeys-hook

p-himik05:01:27

It's documented in the markdown files in the Reagent repo.

Mitul Shah16:01:15

It’s not that helpful in this case, was wondering if anyone has examples of using a custom hook in their own project https://github.com/reagent-project/reagent/blob/master/doc/ReactFeatures.md#hooks

p-himik16:01:18

Why is it not helpful? The very first code block at that link shows exactly how you'd do it in a Reagent-only project.