Function: useDevtoolsSnapshot()
Function: useDevtoolsSnapshot()
Section titled “Function: useDevtoolsSnapshot()”useDevtoolsSnapshot<
S,M>(client,options):DevtoolsSnapshot
Defined in: devtools/src/hooks.ts:23
Poll the underlying IndexedDB to reflect the sync state to a devtools
panel. Uses the internal store constants — hence the dependency on
@sh1n4ps/plasma-client/internal, which is out of semver but stable enough for
a devtools tool.
The schema prop is forwarded to openIdb so version upgrades line up
with the app’s own client. Refresh cadence is polling-based (default
500 ms) because IDB does not surface a change stream cheaply.
Type Parameters
Section titled “Type Parameters”S extends Record<string, AnyTable>
M
Parameters
Section titled “Parameters”client
Section titled “client”PlasmaClient<S, M>
options
Section titled “options”dbName
Section titled “dbName”string
schema
Section titled “schema”S
refreshIntervalMs?
Section titled “refreshIntervalMs?”number