Hacker News new | past | comments | ask | show | jobs | submit login

I stopped using React around the time hooks were introduced, and never figured out what problem they were supposed to solve.



I have something that has a lifecycle and I don't want to initialize and destroy the state every time. I encapsulate that into a function, call it a hook, and go about my day knowing that I don't have to care about redoing the lifecycle every single time.

It's basically a class that has pre-written lifecycle functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: