rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.9k stars 862 forks source link

Documentation for Migration is unnecessary complicated. #1453

Open AmitDigga opened 9 months ago

AmitDigga commented 9 months ago

I have gone through https://github.com/rt2zz/redux-persist/blob/master/docs/migrations.md

Guide looks like snapshot of basic usage, without any compilation error. A real life use case will be very helpful.

Expectation from guide

  1. Talks about a real life scenario. Like a store of books and movies
    1. How to add one more key like songs ?
    2. How to remove one key like books?
    3. How to modify existing books data?
  2. {... 1: (state) => {...}} what does this mean. Here 1 is the new state version or old state version?
  3. If old version is 2 and new version is 5, how migrations will work?
  4. What will happen if i have missing key in migration { 1: ()=>{} , 2:()=>{} , 4:()=>{}}
  5. What is rehydrated and how it works related to migration?
  6. A example of createMigration usage and same usage without createMigration.
Grawl commented 4 months ago

Any Redux-related documentation is unnecessary complicated 😅