PersistenceStrategy
Pluggable storage backend for persisting and restoring serialized store state.
Implement this interface to provide platform-specific storage (e.g. SharedPreferences, a file on disk, or an in-memory store for tests) and pass it to the store builder:
val store = createStore {
persistence(MyPersistenceStrategy())
module(CounterModule)
}Content copied to clipboard
All methods are suspend so that I/O can be performed on the appropriate dispatcher without blocking the calling coroutine.