-
Notifications
You must be signed in to change notification settings - Fork 379
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
React-Redux 6.0.0 Upgrade fails with : TypeError: state.get is not a function #841
Comments
Possible Reason : Ref : https://github.com/reduxjs/react-redux/releases |
Similar problem, since I updated react-redux to v6 I get this error:
|
any updates? |
Is there any update? |
const enhancedWithRowData = ({ griddleKey }, data, callback) => { Can't find any solution so I apply my own solution |
@juniorzed what'd you end up going with as a solution? |
Anyone has an answer on this one ? tip |
Interestingly the ability to pass a store as a prop was re-instated in react-redux v7.01 |
React-Redux v7 |
I know for the most won't be a solution, but in my case I proceeded with the following. We had a scenario where we were enhancing one component with the rowData and some props provided by the parent component that was instantiating Griddle itself, as per code extracted below.
and then
This is where we were before to move to new react-redux, react and other libraries that have been upgraded. What I ended up doing (not ideal, but still a solution for us) was to replicate the data required per cell, so the function that was building the data to be given to Griddle, as per below
has been modified in the following (this is the NOT efficient part since we have redundant information, but still, for now it address the problem and the information size on our side is negligible)
so that we can import the customComponent as below
|
that was a temporary solution for me at that time like a year ago @followbl |
Griddle version
1.13.1
react-redux : 6.0.0
react : 16.6.7
Expected Behavior
enhancedWithRowData shall work properly giving rowData
Actual Behavior
enhancedWithRowData giving error
Steps to reproduce
upgrade react-redux to 6.0.0. then griddle react fails as given below
×
←→1 of 6 errors on the page
TypeError: state.get is not a function
rowDataSelector
src/main/webapp/src/core/Table/enhancedWithRowData.js:4
1 | import { connect } from 'react-redux';
2 |
3 | const rowDataSelector = (state, { griddleKey }) => {
The text was updated successfully, but these errors were encountered: