rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.94k stars 866 forks source link

What is key in config? #1290

Closed amsterdamharu closed 3 years ago

amsterdamharu commented 3 years ago

The readme shows the following code a couple of times:

const persistConfig = {
  key: 'root',
  storage: storage,
  blacklist: ['navigation'] // navigation will not be persisted
};

But other than stating it's mandatory it is not explained what this key means.

Fill api documents clears it up in no way by stating the key for the persist

amsterdamharu commented 3 years ago

....

gmadez commented 3 years ago

I've used it as the "name" of the file in conjunction with prefix (defaulted to "persist" as per constants.js) So, an input like this one: image

generates the following file: image