Post

did you know that you can conditionally exit an effect? this is useful if you want a subscription to only stay active while some condition is true, and to stay removed while that condition is false. a bit mindbending, but so it is with react!

yup, one useEffect per one distinct synchronization process

0 reposts5 likes

Doesn’t useEffect have a bunch of “background” stuff that it does that end up adding processing time? Isn’t it better to avoid useEffect as much as possible ?