joanllenas / ngx-remotedata

💥 Synchronize data fetching and UI state
BSD 3-Clause "New" or "Revised" License
32 stars 6 forks source link

stateManagement -> de/serialization #9

Closed elegon32 closed 4 years ago

elegon32 commented 4 years ago

when using this with redux, how to serialize/deserialize state - in order to create snapshots for mocks, localStorage etc... All instanceof checks will stop working after reading the state from json and so would all of the pipes stop working. Or am i missing some point? How do you sovle this?

joanllenas commented 4 years ago

Hi @elegon32 , I added an example of ngrx store rehydration, look at this file: https://github.com/joanllenas/ngx-remotedata/blob/master/src/app/app.module.ts