Skip to content
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

local-storage #3

Closed
maxisam opened this issue Aug 5, 2017 · 3 comments
Closed

local-storage #3

maxisam opened this issue Aug 5, 2017 · 3 comments

Comments

@maxisam
Copy link

maxisam commented Aug 5, 2017

Thanks for sharing. It is a great repo.

I would like to recommend you using ngrx-store-localstorage instead.

@tomastrajan
Copy link
Owner

That's a good point, will look into that if i find some time. Feel free to submit a PR if you wanna look into that 😉.

@axmad22
Copy link

axmad22 commented Nov 15, 2017

local-storage loads in the initial states saved, but on ngrx-effects-init for root action event it removes feature states that are yet to be loaded in and only the root state gets hydrated, but when I use the StoreDevtoolsModule it works any idea why .am guessing its cause am using the combineReducers. Thank you for sharing the code

@tomastrajan
Copy link
Owner

I have looked into this and also checked issues in ngrx-store-localstorage repo. They have similar problems with hydrating initial state for lazy loaded feature reducers.

The issue with losing initial state was present also in this repo and was solved by following commit by merging initial state on both INIT and UPDATE (reducers) actions emitted by ngrx every time a new lazy reducer is added.

Now it seems to work as expected and as a bonus a debug DEV only meta reducerwas added to log all actions and the corresponding states.

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

No branches or pull requests

3 participants