The Rematch persist plugin
Last but not least is the Rematch persist plugin, a plugin of just 167 bytes for handling automatic state persistence. It's built on top of the redux-persist library (https://github.com/rt2zz/redux-persist). We can persist to hundreds of different storage services our whole Rematch store state.
Installation and configuration
Install it like all the other official Rematch plugins:
yarn add @rematch/persist redux-persist
The Rematch persist plugin also accepts some configuration through four arguments:
persistConfig: This is the first argument and is an object compatible with theconfigargument accepted by theredux-persistlibrary.nestedPersistConfig: Whenever you need to use a nested persist configuration for some models, we can provide an object with a mapping from the model's name to theredux-persistconfig for this model.persistStoreConfig: The object compatible with the configuration argument accepted by theredux...