コンテンツにスキップ

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.

S extends Record<string, AnyTable>

M

PlasmaClient<S, M>

string

S

number

DevtoolsSnapshot