3 ms·
It absolutely is. But the article and the comments above mention that it’s more useful to have the mental model of synchronizing side effects with state. It’s
by dgb23 4y ago
It absolutely is. But the article and the comments above mention that it’s more useful to have the mental model of synchronizing side effects with state.
It’s good advice, because it addresses a major stumbling block people struggle with. After that the code and the way useEffect is used becomes simpler.
- Rapzid 4y agoFrom the linked article in this thread: > Here's the crux of the issue: useEffect is not a lifecycle hook. That doesn't leave much room for ambiguity; seems like a definitive statement. Many don't see any nuance here and then go around blasting people for saying useEffect is a lifecycle hook because they read on some blog the exact opposite. But anyway, what is a lifecycle hook if not a way to synchronize two systems... ( ͡° ͜ʖ ͡°)