r/javascript • sand was never meant to think • Sep 10 '24

Use react hooks in classes

https://github.com/NullVoxPopuli/classy-react/tree/main
3 Upvotes

12 comments sorted by

View all comments

5

u/nullvoxpopuli sand was never meant to think Sep 10 '24

Just a little challenge i whipped up. Not meant for serious usage. 

Try it here on stackblitz: https://stackblitz.com/edit/vitejs-vite-e9khzt?file=src%2FApp.jsx

Some video evidence of it working: https://x.com/nullvoxpopuli/status/1833305383542178172/mediaviewer?currenttweet=1833305383542178172&currenttweetuser=nullvoxpopuli

4

u/bigtoley Sep 10 '24

Very nice!