MCPcopy Create free account
hub / github.com/expo/examples / useAndStartPersister

Function useAndStartPersister

with-tinybase/App.js:122–132  ·  view source on GitHub ↗
(store)

Source from the content-addressed store, hash-verified

120};
121
122const useAndStartPersister = (store) =>
123 // Persist store to Expo SQLite or local storage; load once, then auto-save.
124 useCreatePersister(
125 store,
126 (store) =>
127 process.env.EXPO_OS === "web"
128 ? createLocalPersister(store, "todos")
129 : createExpoSqlitePersister(store, SQLite.openDatabaseSync("todos.db")),
130 [],
131 (persister) => persister.load().then(persister.startAutoSave)
132 );
133
134// Styles for the app.
135const styles = StyleSheet.create({

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected