useHook
Just use the hooks. This library aims to provide a possibility to use fancy React hooks in yur plain old components. Yes, even in classes. It does so, by providing a render prop
which you can pass your hook to.
Usage
See example
folder. Or enjoy a codesandbox!
; ; Component { return <UseHook hook=useState 0> <div> <span>Number: number</span> <button onClick= >+1</button> </div> </UseHook> ;}
Contributors
Thanks goes to these people (emoji key):
Christoph Benjamin Weber 💻 📖 💡 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
LICENSE
MIT