LiveStore requires Expo’s New Architecture (Fabric + TurboModules). Make
sure your project has it enabled before continuing — see the
Expo guide for setup
instructions.
Install packages
Install the LiveStore core, the Expo adapter, and the React bindings. Also install Optionally install the Expo devtools integration:
expo-sqlite, which the adapter uses for on-device persistence.When using pnpm, add
node-linker=hoisted to your .npmrc file. Expo does
not yet support non-hoisted installs.Configure Babel and Metro
LiveStore Devtools uses Vite internally. Add Update your Babel config:Update your Metro config to add the LiveStore devtools middleware:
babel-plugin-transform-vite-meta-env to emulate import.meta.env in the Metro bundler:babel.config.js
metro.config.js
Skip the Babel and Metro changes if you are not using the Expo devtools
integration.
Define your schema
Create
src/livestore/schema.ts. The schema declares your events, SQLite tables, and materializers.src/livestore/schema.ts
Configure the store
Create The
src/livestore/store.ts. This file creates the Expo adapter and exports a useAppStore hook.src/livestore/store.ts
boot callback runs once when the store is first created. Use it to seed initial data.Set up LiveStoreProvider
Wrap your app root with
StoreRegistryProvider inside a Suspense boundary:src/Root.tsx
Devtools
To open the devtools, start the app and pressshift + m in the terminal, then select LiveStore Devtools and press Enter. This opens the devtools in your browser where you can inspect state, replay events, and monitor performance.
Database location
The SQLite database is stored in the app’s Documents directory. With Expo Go — open the database directory in Finder:[BUNDLE_ID] with your app’s bundle identifier: