Home > Software design >  How do I update persistent data after publishing the app?
How do I update persistent data after publishing the app?

Time:11-17

As of now, my app contains an array and the user can manipulate the order of items in it by dispatching actions. I'm using redux persist and even if I directly change the array elements by editing the source file, the array does not update unless I clear the app cache. What are my options to update this kind of persistent data after I publish it to the store without forcing users to clear the cache?

CodePudding user response:

What are you looking for is migrations. How it works:

  1. Load user's previous state from local storage on app start
  2. Update fields you need

Here is a setup example

  • Related