-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liform doesn't work with react-redux 6.0 #54
Comments
Same problem ! Had to switch back to using : "redux-form": "^7.4.2", ... ReactRedux provides <ReactReduxContext.Consumer>{({ store }) => {} }}</ReactReduxContext.Consumer>. Perhaps it should be wrapped arround the FinalForm in Liform ? I tried to embed the Liform inside the above statement, but the error is thrown inside Liform itself. |
Hi ! Still having the same problem, did anyone find a solution, beside switching back to an earlier version of redux-form/react-redux ? |
Having the same problem I found out that the problem is not really liform-react not being compatible but rather that its dependencies are outdated and that causes 2 versions of react-redux to be installed if you have a newer installation specified in package.json (or some other package has as a dependency). I will probably submit a PR but until that is done and accepted the easier solution is to override the dependency-resolution in the top level project either by editing package.lock.json for npm or using https://yarnpkg.com/en/docs/selective-version-resolutions if you are using yarn. In my case
in package.json solved it (only works if using yarn) |
In react-redux v6 passing the store directly as a prop to a connected component was removed.
When I try to use liform with "react-redux": "^6.0.0" I get the following error:
Uncaught Error: Could not find "store" in either the context or props of "Connect(Form(BaseForm))". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(Form(BaseForm))"
I used https://github.com/Limenius/symfony-react-sandbox to test this. The error appears after changing react libraries to more recent versions and running yarn upgrade.
This is what I used in package json:
"dependencies": {
"bootstrap-sass": "^3.3.7",
"classnames": "^2.2.6",
"jquery": "^3.3.1",
"js-yaml": "^3.12.0",
"jwt-decode": "^2.2.0",
"liform-react": "^0.9.0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-helmet": "^5.2.0",
"react-on-rails": "^11.2.1",
"react-redux": "^6.0.0",
"react-router-dom": "^4.3.1",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"redux-thunk": "^2.3.0"
},
The text was updated successfully, but these errors were encountered: