3 ms·
In useEffect your code runs at a specific point, where it’s safe to bridge react to the outside world. It’s not about breaking the rules, as much as you have th
by ojkelly 4y ago
In useEffect your code runs at a specific point, where it’s safe to bridge react to the outside world. It’s not about breaking the rules, as much as you have the ability to cause and react to side effects (eg a fetch promise) and inform react about the result (with a setState).
- dgb23 4y agoThat’s much better explanation and more precise wording than the linked article did. I like the notion of “safe bridge”.