-
Notifications
You must be signed in to change notification settings - Fork 61
State getter should return state when it is nested in an immutable object #153
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #153 +/- ##
==========================================
+ Coverage 76.6% 76.92% +0.31%
==========================================
Files 87 112 +25
Lines 4287 4541 +254
Branches 277 277
==========================================
+ Hits 3284 3493 +209
- Misses 803 838 +35
- Partials 200 210 +10
Continue to review full report at Codecov.
|
Changes look good, I will verify tonight. Did you run this version with your local app to make sure it handles immutable state correctly? |
docs/USING_GRID_REDUCERS.md
Outdated
@@ -109,15 +109,15 @@ If you want to hide grid reducers from the root of your state: | |||
|
|||
````js | |||
import { combineReducers } from 'redux'; | |||
import { GridRootReducer } from 'react-redux-grid'; | |||
import { rootReducer } from 'react-redux-grid'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we probably don't want rootReducer
here, we just want the Reducers
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's change this to Reducers
and then I'm ready to merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right :). I've changed it to
import { Reducers as rootReducer } from 'react-redux-grid';
to clarify that Reducers
is actually the rootReducer
If your entire redux state in Immutable you ran into problems when nesting the grid-reducers in a separate reducerKey. The StateGetter was in the assumption that the parent object is always a plain Object. With this pull-request it is also possible nest your grid reducers in an Immutable object.
Now this works:
...also fixed a wrongly named export in the docs