Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Action type: '@ngrx/store/update-reducers' #78

Open
chekit opened this issue Jan 25, 2018 · 4 comments
Open

Action type: '@ngrx/store/update-reducers' #78

chekit opened this issue Jan 25, 2018 · 4 comments

Comments

@chekit
Copy link

chekit commented Jan 25, 2018

I'm faced with strange behaviour by @ngrx/store-devtools.

Environment:

  • Windows 10 Pro
  • Chrome Version 63.0.3239.132
  • Node v6.11.3, Node v8.9.4
  • Project generated with Angular CLI v1.5.0,
  • Angular v5.1.3

Problem

If I'm using this packages with corresponding versions:

    "@ngrx/effects": "^4.1.1",
    "@ngrx/store": "^4.1.1",
    "@ngrx/store-devtools": "^5.0.0",

When I'm opening Redux Devtools in Chrome among my Actions stack there is one with type @ngrx/store/update-reducers. That action causes the app to fail, cause the last action in stack has state as undefined. If I click 'skip' on that action (@ngrx/store/update-reducers) the app starts working normally and every action will have its proper state.

If I'm changing version to 4.0.0. everything works properly without any side actions.

    "@ngrx/effects": "^4.1.1",
    "@ngrx/store": "^4.1.1",
    "@ngrx/store-devtools": "4.0.0",
@drew-codes
Copy link

drew-codes commented Jan 30, 2018

Encountering this exact issue, however I am using "@ngrx/store": "5.0.0"

@Halt001
Copy link

Halt001 commented Feb 2, 2018

Could it be that one of your reducers is not returning the unmodified state for unknown actions in the default clause of an action switch?

@chekit
Copy link
Author

chekit commented Feb 3, 2018

@Halt001 For my case I have added a default clause for all reducers and got the issue with @ngrx/store/update-reducers
If you interested you can check the demo app where I fist faced with that issue: https://github.com/chekit/ngrx-101/tree/final/src/app/store/reducers (branch final)

@Halt001
Copy link

Halt001 commented Feb 3, 2018

I see what you mean. You don't have to skip @ngrx/store/update-reducers to make it work again. If you toggle skip on the last action in the stack the state is no longer undefined and it also starts working again.

Another observation is that when viewing the last action on the stack the state is undefined but the diff says states are equal, which isn't true. Also the last action in the stack is displayed in a slightly dimmed grey so it looks like some processing hasn't finished yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants