getPersistableState
Last updated
Last updated
Returns a state pruned from outdated data. about what is removed from the state exactly.
(state): (object
) The current Redux state
(persistOptions): (object
) An object containing additional, optional options for the pruning:
A. (alwaysPersist): (string || array<string>
) String or array of strings containing resource name(s). Request performing on the resource(s) will always be persisted, expired or not B. (neverPersist): (string || array<string>
) String or array of strings containing resource name(s). Request performing on the resource(s) will never be persisted, expired or not
(state): A new state, pruned from outdated data
This example demonstrates how to integrate with redux-rest-easy, by creating a , a dependency of redux-offline.
persistOptions.alwaysPersist
is a great way to persist resources you would never want to expire
persistOptions.neverPersist
is a great way to clear some resources each time your app starts