Cross-browser extensions and Chrome apps states syncing
Support redux-persist 3.x only
chrome.storage is not defined (for Safari and old versions of Firefox), it includes redux-persist-crosstab to use
const finalCreateStore = createStoreconst store =const persistor =
To blacklist some portion of state, for example if you want to avoid syncing route state:
See browser-redux for a boilerplate and more details.
Redux Persist does a shallow merge of state during rehydration. This means that if state changes on two tabs simulataneously, it is possible that legitimate state will be lost in the merge. In most cases this will not be an issue. One scenario where this could happen is if both tabs are listening on a socket and they both receive a message at the same time. If you have this type of set up you will either need to blacklist the relevant reducers or implement a custom rehydration handler that takes into account the nuances of this situation.