Support React-Redux v6.
See original GitHub issueReact-Redux v6 will use React’s ( new ) context api which is not compatible with the legacy context API. By accessing store from context ( reference ) it causes the app to break when it tries to dispatch the LOCATION_CHANGE
action.
As @timdoor has described in its breaking changes:
Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom
context={MyContext}
prop to both<Provider>
and<ConnectedComponent>
. You may also pass{context : MyContext}
as an option to connect.
Related React-Redux links:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Connect | React Redux
Overview. The connect() function connects a React component to a Redux store. It provides its connected component with the pieces of the ...
Read more >Upgrading to React-Redux v6: Around the New Context API
In this writeup I will cover the following topics about React-Redux v6: Using custom context; Accessing the store; Supporting multiple stores.
Read more >Use of React router v6 history/Navigate in redux [duplicate]
Closed 11 months ago. I'm trying to use history.push("/") from react router v6 to redirect when action is dispatched from ...
Read more >Upgrading to React-Redux v6: Around ... - A Work in Progress
In this writeup I will cover the following topics about React-Redux v6: Using custom context; Accessing the store; Supporting multiple ...
Read more >7 MERN Tutorial || React Redux Toolkit || React Router v6
In this video, we are going to create react app. We have used the redux toolkit for state management. And React router dom...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Based on @wgao19’s fix, I made a PoC in #191. Please check it out and let me know what you all think.
Update: I just published it as
connected-react-router@next
(v6.0.0-beta.1).connected-react-router 6.0.0-beta.1 works for me with react-redux 6.0.0