tshaddix / webext-redux

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

Data not persisting #288

Open HassanKhan123 opened 2 years ago

HassanKhan123 commented 2 years 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 2 years 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 2 years ago

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