Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.
Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.
As someone who’s worked with react for years, I’m convinced that react itself is the problem and there’s no way to educate new people on the proper way to use it without essentially teaching them everything the abstraction is intended to do for them. Why should newbs have to care about mutations and state dependencies when the api is apparently designed to help them forget about those things?
Exactly this. Instead of learning about the complexity and footguns of working directly on the DOM, people get to learn about the complexity and footguns of manipulating the virtual DOM.
React isn’t bad, but it was designed in a very opinionated way to build certain kinds of apps. Excessive abuse of React hooks shows a common desire path to build things that don’t require that framework. Most people basically just want signal based reactivity but don’t know that it exists.
The React devs fucked up by not wrapping state in trackable containers, and we’re all paying the price with laggy apps.