tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.22k stars 179 forks source link

Data not persisting #288

Open HassanKhan123 opened 1 year ago

HassanKhan123 commented 1 year ago

I am working on an extension and I am unable to persist my data in redux. Every time I close the browser or refresh the extension, all my previous gets lost and I have to start all over again.

tdriley commented 1 year ago

I believe that by default, the data is stored in memory only and only shared across the extension parts using message communication. If you want to persist across reloads, you need to make your reducer store to extension local or session storage on change, and then check that and load it out on initialisation.

HassanKhan123 commented 1 year ago

I am using redux persist for data persistence but am still not able to save data.