News for hackers. Stuff that matters.
Re:React is a fractal of bad design by scotty79 on Wednesday March 08, 2023 @06:05AM (#35067566)
I don't see a problem with useEffect. It releses you from thinking about component lifecycle.

Conceptually the body of your component runs on every render. If you want to have some effect on your component not running in sync with that then you have useEffect to set it up and clean it up not when the component is mounted, unmoutend, rerendered ... just when the stuff you are interested in changes.

There are no comments on this comment yet.