Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an issue of you not understanding how to properly manage the state of your application, not React.

It's very likely that you're using effects improperly.



Effects are way too easy to use improperly. I used to be a fan of useEffect when it came out because of its concision, but after working with countless devs/agencies, it's clear that most people misuse it. The rules of useEffect are inelegant, and creating readable state machines with useEffect is very hard. You end up with spaghetti code either in your custom hook, or directly in the component. While most components need 2-3 effects rather than 20, useEffect is not a scalable way of managing state IMO.





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

Search: