I have a shopping cart which I am maintaining with Ngrx and for maintaining the persistence of the state after a page refresh I have two options:
I am storing some price related data so didn't want to store in local storage.
What should I use? Or is there any better way to do this?
Using the following library you can achieve your desired result
https://www.npmjs.com/package/ngrx-store-localstorage
I am using it myself in multiple projects and it works great, it acts as a meta reducer and therefore 'automatically' takes care of things for you.
https://ngrx.io/guide/store/metareducers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With