r/javascript • u/nullvoxpopuli sand was never meant to think • Sep 10 '24
Use react hooks in classes
https://github.com/NullVoxPopuli/classy-react/tree/main
3
Upvotes
r/javascript • u/nullvoxpopuli sand was never meant to think • Sep 10 '24
2
u/romgrk Sep 10 '24
Nice ideas, I've also been working on something similar though I wasn't able to figure out a nice API yet.
I did write it for a serious usage though, functional components have tradeoffs that make them inferior to class components in some situations: https://romgrk.com/posts/react-functional-components/