fix(Store): Handling of @ngrx/store/update-reducers Action on Startup leads to strange behaviour for initialStates#909
Closed
berthertogen wants to merge 3 commits intongrx:masterfrom
berthertogen:issue-branch-906
Closed
fix(Store): Handling of @ngrx/store/update-reducers Action on Startup leads to strange behaviour for initialStates#909berthertogen wants to merge 3 commits intongrx:masterfrom berthertogen:issue-branch-906
berthertogen wants to merge 3 commits intongrx:masterfrom
berthertogen:issue-branch-906
Conversation
leads to strange behaviour for initialState
- assign the new state to the overall initial state instead of
returning the new state only
- Add test to simulate the following situation:
Module MA and MB with initial state IA and IB in module
Overall initial state RootIAB { IB } with only state of MB being
initiated
When action '@ngrx/store/update-reducers' is fired for MA the
RootIAB should be merged with IA so we don't lose the IB
initialization in RootIAB
- Fixed failing test to expect 0 instead of undefined
with only state of MB being initiated
When action '@ngrx/store/update-reducers' is fired for MA the RootIAB
should be merged with IA so we don't lose the IB initialization in
RootIAB
- Fixed failing test to expect 0 instead of undefined
Member
|
If I'm understanding this change correctly it won't be possible to remove state keys by removing reducers, right? I'm not sure if I want to merge in the fix if that's the reprecussion. The harder fix would be to change the way the |
|
What's the status on this ? Should we worry about all the |
brandonroberts
pushed a commit
that referenced
this pull request
Jul 13, 2018
timdeschryver
added a commit
to timdeschryver/platform
that referenced
this pull request
Jul 15, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Module MA and MB with initial state IA and IB in module.
Overall initial state RootIAB { IB } with only state of MB being
initiated.
When action '@ngrx/store/update-reducers' is fired for MA the RootIAB should be merged with IA so we don't lose the IB initialization in RootIAB.
Closes #906