You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please see the following example. The only difference between Bar and ConnectedBaz is that the second one uses redux connect.
The problem is that the context changes do not get propagated to the component Baz and it statically renders 0. Cmponent Bar is being updated and re-rendered correctly every second.
Yes, this is a known React issue.
There are a few possible fixes:
Don’t rely on context updates propagating correctly and instead expose something like subscribeToMyThing() in context. (This is pretty much what React Redux does by the way.)
Pass { pure: false } as the fourth argument to connect(). This will significantly slow it down but context changes will propagate.
Please see the following example. The only difference between
Bar
andConnectedBaz
is that the second one uses reduxconnect
.The problem is that the context changes do not get propagated to the component
Baz
and it statically renders0
. CmponentBar
is being updated and re-rendered correctly every second.The text was updated successfully, but these errors were encountered: