3 ms·
It's necessary but way overused. The docs have a whole page explaining how things some devs do with useEffect should be done differently: https://react.dev/lear
by Scarblac 3y ago
It's necessary but way overused. The docs have a whole page explaining how things some devs do with useEffect should be done differently: https://react.dev/learn/you-might-not-need-an-effect https://react.dev/learn/you-might-not-need-an-effect.
I think class based components led to really strange patterns that people thought should all be replaced with useEffect in function components.
UseEffect is sometimes necessary and then it's fine but it's a code smell too.