implement global key prefix
reslear opened this issue · 3 comments
reslear commented
add option, to add and strip prefix for localstorage
createPersistedStatePlugin({
prefix: '_p_'
})
like have store with name account
in localstorage key - _p_account
soc221b commented
It is more flexible to provide a function
plugin option:
const identity = _ => _
createPersistedStatePlugin({
alterKey: (storeKey: string) => string = identity
})
Feel free to pull request 😄 .
reslear commented
Yes, it will be relevant only for localstorage, like sugar for no copy-past setItem,getItem )
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.