Closed chauey closed 5 years ago
@chauey thank you very much for your feedback we will have a look into this!
The problem here is comes from initStateFromLocalStorage
.
The example state is getting partially loaded with {todos: {...}}
and we're overriding the example state with this state from the local storage. Because we don't have a local storage state from our CRUD reducer, this CRUD state just disappears.
To solve this we'll have to spread the example state, instead of overriding the example state as a whole. In other words the following line is wrong:
return { ...newState, ...LocalStorageService.loadInitialState() };
If you want you can give this a shot @chauey , otherwise I'll submit a PR.
This is solved.
Minimal reproduction of the bug with instructions:
Expected behavior:
Other information:
Perhaps related to rehydrating app state from localstorage but not having code to handle missing collection data
I would be willing to submit a PR to fix this issue:
[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No