makePersistedAdapter
makePersistedAdapter(
options):Adapter
Defined in: index.ts:114
Creates a persisted LiveStore adapter for Expo/React Native applications.
This adapter stores data in SQLite databases on the device filesystem, providing persistence across app restarts. It supports optional sync backends for multi-device synchronization.
Requirements:
- React Native New Architecture (Fabric) must be enabled
- Expo SDK 51+ recommended
Parameters
Section titled “Parameters”options
Section titled “options”MakeDbOptions = {}
Returns
Section titled “Returns”Adapter
Examples
Section titled “Examples”import { makePersistedAdapter } from '@livestore/adapter-expo'import { makeWsSync } from '@livestore/sync-cf/client'
const adapter = makePersistedAdapter({ sync: { backend: makeWsSync({ url: 'wss://api.example.com/sync' }), }, storage: { subDirectory: 'my-app', },})// Minimal setup without syncconst adapter = makePersistedAdapter()https://livestore.dev/docs/reference/adapters/expo for detailed setup guide