Closed Ch4t4r closed 4 years ago
Seems to be this:
Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both
and . You may also pass {context : MyContext} as an option to connect.
From https://github.com/reduxjs/react-redux/releases (6.0.0)
A workaround is to use
"dependencies": {
"connected-react-router": "^5.0.1",
"react-redux": "5.0.6",
"redux": "^3.7.2",
"redux-box": "^1.6.1"
}
(Im using connected-router as well)
After further reading I believe that I have to pass a custom Context into the <Provider>
, but that throws another exception as well. This change in v6 of react-redux is really frustrating imo.
I'm not to sure whether redux-box has to change anything at all, close this if necessary.
@Ch4t4r Have hardcoded react-redux version for now, until breaking changes are incorporated into redux-box. Can you check back at your end for redux-box@1.6.2?
When using the newest versions of react-redux (
^6.0.0
) and redux (^4.0.1
) instead of the versions this project uses (5.0.6
and^3.7.2
) the following exception occurs:Either wrap the root component in a <Provider>, or explicitly pass “store” as a prop to "Connect(MyComponent)
when using this setup (simplified):I guess there has been a breaking change between the versions - it does work when using the lower versions in the project. Would be nice if someone more skilled than I am could take a look (and maybe update the dependencies?)