Does ngrx state a persis…

less than 1 minute read

Does ngrx state a persistent ? When client reload a browser, state are gone? Is there way described here is correct ? https://medium.com/better-programming/sync-your-state-in-local-storage-with-ngrx-9d6ceba93fc0 Medium: Sync Your State in Local Storage With NgRx

Responses:

https://nx.dev/angular/guides/misc-data-persistence#using-datapersistence

Thanks. I can’t get where is a state stored in this case ? How It can be restored in case of reloading page ?

I don’t believe state is persisted unless you explicitly tell it to. You would do this by following the steps in the tutorial the linked to. Unless you are asking if somehow state can get cached by the browser?

My question was, should I use localstorage together with ngrx storage ? Or ngrx already care about state after user close and open browser again :)

Ngrx does not know anything about local storage. If you want to persist state you need to explicitly save it.

Updated: