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
6
u/izzlesnizzit Sep 10 '24
React hooks are great and all, but the class blueprint+instance paradigm conceptually just makes more sense to me as a way of describing components rendered as instances "living" on a page. If there were ever an "officially" supported way of having hook-like behavior in classes, I would definitely give it a serious try.