Description
redux-dynamic-modules-react
currently has this chunk of code:
This was related to a bug that popped up in React-Redux v7 beta 0, at reduxjs/react-redux#1219 .
Looking at the code further, I can see that you're rendering a <ReactReduxContext.Provider>
with your own value. By doing that, you're actually going to completely override the context value from React-Redux itself. That context value normally looks like {store, subscription]
in v7. Based on your code, the subscription
value will be lost, and nested connected components will not be updated in the correct sequence, and will not take advantage of React's batched updates.
I'd suggest changing this chunk to render both a <ReactReduxContext.Consumer>
and a <ReactReduxContext.Provider>
, pass down a context value that looks like {store, storeState, subscription}
, and memoize producing that value so that it doesn't keep changing on every render (to avoid unnecessary context-caused updates).