Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: Add explanation of how migrations work #1369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/migrations.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Redux Persist Migration Example

Redux Persist takes all functions from `migrations` above the inbound persisted store version and runs them in ascending order (by version key) to return the final state

It's mean every time you update your state schema and want to support users with persisted data -- you have to create migration and increase a `version` in [config object](https://github.com/rt2zz/redux-persist/blob/master/types/types.d.ts#L27)

## Redux Persist Migration Example

### Example with createMigrate
```js
Expand Down