withReactApi
withReactApi<
TSchema>(store):Store<TSchema, { }> &ReactApi
Defined in: packages/@livestore/react/src/useStore.ts:23
Augments a Store instance with React-specific methods (useQuery, useClientDocument).
This is called automatically by useStore() and LiveStoreProvider. You typically
don’t need to call it directly unless you’re building custom integrations.
Type Parameters
Section titled “Type Parameters”TSchema
Section titled “TSchema”TSchema extends LiveStoreSchema<DbSchema, EventDefRecord>
Parameters
Section titled “Parameters”Store<TSchema>
Returns
Section titled “Returns”Store<TSchema, { }> & ReactApi
Example
Section titled “Example”// Usually not needed—useStore() does this automaticallyconst store = withReactApi(myStore)const todos = store.useQuery(tables.todos.all())