connected-react-router: Error `Could not find "store" in the context` when adding context to the provider and connectedRouter
Based 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"
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 4
- Comments: 15
Figured it out. All I was missing was the
ReactReduxContextI’ve solved it via bumping up to date all the packages linked with
connected-react-routerdirectly:connected-react-routerreactreduxreact-reduxreact-routerreact-router-domSeems like some of the inner dependencies had a problem with new
connected-react-routercontext core.And it works for me now! 😃