4 ms·
I stopped using React around the time hooks were introduced, and never figured out what problem they were supposed to solve.
by barbecue_sauce 4y ago
I stopped using React around the time hooks were introduced, and never figured out what problem they were supposed to solve.
- cercatrova 4y agoI 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.