Interface for storage adapters used to persist device preferences.
Remarks
Implement this interface to provide a custom storage backend. Methods may
return values synchronously or as promises -- the store handles both.
For most React Native apps, use createAsyncStorageAdapter which
wraps @react-native-async-storage/async-storage with a sync cache.
Interface for storage adapters used to persist device preferences.
Remarks
Implement this interface to provide a custom storage backend. Methods may return values synchronously or as promises -- the store handles both. For most React Native apps, use createAsyncStorageAdapter which wraps
@react-native-async-storage/async-storagewith a sync cache.Example
Custom in-memory storage (useful for testing):
See
createAsyncStorageAdapter for the recommended AsyncStorage wrapper