keajs / kea-localstorage

Persist the state of your reducers in localstorage
https://kea.js.org/plugins/localstorage
MIT License
9 stars 3 forks source link

How to clear states stored in localstorage. #18

Open karthik-hr opened 3 years ago

karthik-hr commented 3 years ago

Is there a way i can clear states stored in local-storage for a specific logic by calling an kea action

mariusandra commented 3 years ago

Hey, unfortunately not. If be happy to merge a PR with something like that though

paolodamico commented 3 years ago

You could just set your reducer to null or undefined (unless you want to clear localStorage without clearing your current reducer).