This project was created to demonstrate a bug, which I believe is in ngrx-actions
.
There are 3 UI components in this project:
- Left counter - Store fully implemented with
ngrx-actions
. - Right counter - Store implemented with ngrx-actions, but
@ngrx/store
standard reducer. - Reset button - Action tied to a reset meta-reducer, which should reset the entire store state.
- Increment left counter ->
loading = false
,loaded = true
- Increment right counter ->
loading = false
,loaded = true
- Select reset button -> both left and right side should have
loading = false
,loaded = false
(defined as initial state)
- Increment left counter ->
loading = false
,loaded = true
- Increment right counter ->
loading = false
,loaded = true
- Selecte reset button:
- Left store ->
loading = true
,loaded = false
- Right store ->
loading = false
,loaded = false
- Left store ->
It appears the ngrx-actions
@Store
portion of the library is mutating the initial state.
Another possibility is not having an equivalent default case state is causing unexpected results.