Error `Could not find "store" in the context` when adding context to the provider and connectedRouter
See original GitHub issueBased on the migration to v5 and v6 and with the following code I’m getting the error listed below.
error message on application start
Could not find "store" in the context of "Connect(Home)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(Home) in connect options.
Packages:
"connected-react-router": "^6.2.1", "react-redux": "^6.0.0"

Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:15
Top Results From Across the Web
reactjs - Could not find "store" in the context of "Connect ...
The reason this was broken from the first place is that I used to be passing my context object directly into <Provider store={store}> ......
Read more >Provider | React Redux
Could not find "store" in the context of "Connect(MyComponent)". Either wrap the root component in a <Provider> , or pass a custom React ......
Read more >connected-react-router - npm
Synchronize router state with redux store through uni-directional ... the same Context to both Provider and ConnectedRouter to make sure ...
Read more >Error `Could not find "store" in the context` when adding ...
Error `Could not find "store" in the context` when adding context to the provider and connectedRouter ... Based on the migration to v5...
Read more >Provider | React Redux
Could not find "store" in the context of "Connect(MyComponent)". Either wrap the root component in a <Provider> , or pass a custom React...
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
Figured it out. All I was missing was the
ReactReduxContext
I’ve solved it via bumping up to date all the packages linked with
connected-react-router
directly:connected-react-router
react
redux
react-redux
react-router
react-router-dom
Seems like some of the inner dependencies had a problem with new
connected-react-router
context core.And it works for me now! 😃