Closed aratcliffe closed 4 years ago
Hi @aratcliffe, thanks for the suggestion. I guess you want this for the useLocalStorageReducer
and useSessionStorageReducer
hooks, right? My first impression is that I'm not sure I see much value in it, you can always put your non-persisted keys in a separate regular useReducer
hook. Do you have a concrete use case example for this?
Closing this as I didn't get any response and I still don't see a use case for this feature.
We have a use case for this feature and we need it. We have a list of items for which we store the list filters using useReducer
. We want to store certain filters using useStorageReducer
but not all of them. For example the filter state looks like this:
{
perPage: 6,
pageNumber: 1,
searchText: '',
sortBy: 'id',
view: 'card', // or 'table'
}
We want to store only view
in local storage not the other keys.
Hi, would you consider adding an option to omit specific keys from being saved to storage?