Take your favorite event emitter. What happens when you subscribe or unsubscribe while it’s already notifying the listeners? Are you sure?
-
Show this thread
-
Replying to @dan_abramov
Btw, does `Context.Consumer` not have similar problems? I feel like it's similar, in that it is subscribed to some `value`, and it can be added or removed from the component hierarchy dynamically. Is what you're saying, that this problem is often not solved but is solved here?
1 reply 0 retweets 0 likes -
Replying to @sebinsua
Context doesn’t use subscriptions at all so there’s no concept of change notification there.
1 reply 0 retweets 0 likes -
Replying to @dan_abramov
Interesting. But renders are caused when the underlying values change. ...I would like to understand how it works?
1 reply 0 retweets 0 likes -
Replying to @sebinsua
React re-renders the tree in one pass, not many separate change listeners
1 reply 0 retweets 0 likes -
Replying to @dan_abramov
So the solution is different because the change listening is minimised?
1 reply 0 retweets 0 likes
If you're too busy to answer now, and looking for a new idea for a blog post... :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.