tinybase 6.0.0-beta.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/_internal/queries/with-schemas/index.d.cts +6 -6
- package/@types/_internal/queries/with-schemas/index.d.ts +6 -6
- package/@types/_internal/store/with-schemas/index.d.cts +1 -1
- package/@types/_internal/store/with-schemas/index.d.ts +1 -1
- package/@types/_internal/ui-react/with-schemas/index.d.cts +13 -13
- package/@types/_internal/ui-react/with-schemas/index.d.ts +13 -13
- package/@types/checkpoints/index.d.cts +0 -1
- package/@types/checkpoints/index.d.ts +0 -1
- package/@types/checkpoints/with-schemas/index.d.cts +0 -1
- package/@types/checkpoints/with-schemas/index.d.ts +0 -1
- package/@types/indexes/index.d.cts +1 -2
- package/@types/indexes/index.d.ts +1 -2
- package/@types/indexes/with-schemas/index.d.cts +6 -7
- package/@types/indexes/with-schemas/index.d.ts +6 -7
- package/@types/mergeable-store/index.d.cts +1 -2
- package/@types/mergeable-store/index.d.ts +1 -2
- package/@types/mergeable-store/with-schemas/index.d.cts +1 -2
- package/@types/mergeable-store/with-schemas/index.d.ts +1 -2
- package/@types/metrics/index.d.cts +1 -2
- package/@types/metrics/index.d.ts +1 -2
- package/@types/metrics/with-schemas/index.d.cts +1 -2
- package/@types/metrics/with-schemas/index.d.ts +1 -2
- package/@types/persisters/index.d.cts +22 -23
- package/@types/persisters/index.d.ts +22 -23
- package/@types/persisters/persister-automerge/index.d.cts +6 -7
- package/@types/persisters/persister-automerge/index.d.ts +6 -7
- package/@types/persisters/persister-automerge/with-schemas/index.d.cts +5 -6
- package/@types/persisters/persister-automerge/with-schemas/index.d.ts +5 -6
- package/@types/persisters/persister-browser/index.d.cts +5 -6
- package/@types/persisters/persister-browser/index.d.ts +5 -6
- package/@types/persisters/persister-browser/with-schemas/index.d.cts +5 -6
- package/@types/persisters/persister-browser/with-schemas/index.d.ts +5 -6
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.cts +7 -8
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.ts +7 -8
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.cts +10 -11
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +10 -11
- package/@types/persisters/persister-durable-object-storage/index.d.cts +5 -6
- package/@types/persisters/persister-durable-object-storage/index.d.ts +5 -6
- package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.cts +5 -6
- package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.ts +5 -6
- package/@types/persisters/persister-electric-sql/index.d.cts +7 -8
- package/@types/persisters/persister-electric-sql/index.d.ts +7 -8
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.cts +10 -11
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +10 -11
- package/@types/persisters/persister-expo-sqlite/index.d.cts +8 -9
- package/@types/persisters/persister-expo-sqlite/index.d.ts +8 -9
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.cts +11 -12
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +11 -12
- package/@types/persisters/persister-file/index.d.cts +3 -4
- package/@types/persisters/persister-file/index.d.ts +3 -4
- package/@types/persisters/persister-file/with-schemas/index.d.cts +3 -4
- package/@types/persisters/persister-file/with-schemas/index.d.ts +3 -4
- package/@types/persisters/persister-indexed-db/index.d.cts +3 -4
- package/@types/persisters/persister-indexed-db/index.d.ts +3 -4
- package/@types/persisters/persister-indexed-db/with-schemas/index.d.cts +2 -3
- package/@types/persisters/persister-indexed-db/with-schemas/index.d.ts +2 -3
- package/@types/persisters/persister-libsql/index.d.cts +4 -5
- package/@types/persisters/persister-libsql/index.d.ts +4 -5
- package/@types/persisters/persister-libsql/with-schemas/index.d.cts +7 -8
- package/@types/persisters/persister-libsql/with-schemas/index.d.ts +7 -8
- package/@types/persisters/persister-partykit-client/index.d.cts +4 -5
- package/@types/persisters/persister-partykit-client/index.d.ts +4 -5
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +3 -4
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +3 -4
- package/@types/persisters/persister-partykit-server/index.d.cts +1 -2
- package/@types/persisters/persister-partykit-server/index.d.ts +1 -2
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +1 -2
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +1 -2
- package/@types/persisters/persister-pglite/index.d.cts +5 -6
- package/@types/persisters/persister-pglite/index.d.ts +5 -6
- package/@types/persisters/persister-pglite/with-schemas/index.d.cts +8 -9
- package/@types/persisters/persister-pglite/with-schemas/index.d.ts +8 -9
- package/@types/persisters/persister-postgres/index.d.cts +8 -9
- package/@types/persisters/persister-postgres/index.d.ts +8 -9
- package/@types/persisters/persister-postgres/with-schemas/index.d.cts +11 -12
- package/@types/persisters/persister-postgres/with-schemas/index.d.ts +11 -12
- package/@types/persisters/persister-powersync/index.d.cts +7 -8
- package/@types/persisters/persister-powersync/index.d.ts +7 -8
- package/@types/persisters/persister-powersync/with-schemas/index.d.cts +10 -11
- package/@types/persisters/persister-powersync/with-schemas/index.d.ts +10 -11
- package/@types/persisters/persister-remote/index.d.cts +3 -4
- package/@types/persisters/persister-remote/index.d.ts +3 -4
- package/@types/persisters/persister-remote/with-schemas/index.d.cts +2 -3
- package/@types/persisters/persister-remote/with-schemas/index.d.ts +2 -3
- package/@types/persisters/persister-sqlite-wasm/index.d.cts +7 -8
- package/@types/persisters/persister-sqlite-wasm/index.d.ts +7 -8
- package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.cts +11 -12
- package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.ts +11 -12
- package/@types/persisters/persister-sqlite3/index.d.cts +5 -6
- package/@types/persisters/persister-sqlite3/index.d.ts +5 -6
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.cts +8 -9
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +8 -9
- package/@types/persisters/persister-yjs/index.d.cts +4 -5
- package/@types/persisters/persister-yjs/index.d.ts +4 -5
- package/@types/persisters/persister-yjs/with-schemas/index.d.cts +3 -4
- package/@types/persisters/persister-yjs/with-schemas/index.d.ts +3 -4
- package/@types/persisters/with-schemas/index.d.cts +26 -27
- package/@types/persisters/with-schemas/index.d.ts +26 -27
- package/@types/queries/index.d.cts +1 -2
- package/@types/queries/index.d.ts +1 -2
- package/@types/queries/with-schemas/index.d.cts +10 -11
- package/@types/queries/with-schemas/index.d.ts +10 -11
- package/@types/relationships/index.d.cts +25 -2
- package/@types/relationships/index.d.ts +25 -2
- package/@types/relationships/with-schemas/index.d.cts +25 -2
- package/@types/relationships/with-schemas/index.d.ts +25 -2
- package/@types/store/index.d.cts +1 -2
- package/@types/store/index.d.ts +1 -2
- package/@types/store/with-schemas/index.d.cts +0 -1
- package/@types/store/with-schemas/index.d.ts +0 -1
- package/@types/synchronizers/index.d.cts +6 -7
- package/@types/synchronizers/index.d.ts +6 -7
- package/@types/synchronizers/synchronizer-broadcast-channel/index.d.cts +3 -4
- package/@types/synchronizers/synchronizer-broadcast-channel/index.d.ts +3 -4
- package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.cts +3 -4
- package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.ts +3 -4
- package/@types/synchronizers/synchronizer-local/index.d.cts +2 -3
- package/@types/synchronizers/synchronizer-local/index.d.ts +2 -3
- package/@types/synchronizers/synchronizer-local/with-schemas/index.d.cts +2 -3
- package/@types/synchronizers/synchronizer-local/with-schemas/index.d.ts +2 -3
- package/@types/synchronizers/synchronizer-ws-client/index.d.cts +5 -6
- package/@types/synchronizers/synchronizer-ws-client/index.d.ts +5 -6
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.cts +5 -6
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.ts +5 -6
- package/@types/synchronizers/synchronizer-ws-server/index.d.cts +29 -30
- package/@types/synchronizers/synchronizer-ws-server/index.d.ts +29 -30
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +33 -34
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +33 -34
- package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.cts +4 -5
- package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +4 -5
- package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.cts +8 -9
- package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +8 -9
- package/@types/synchronizers/synchronizer-ws-server-simple/index.d.cts +4 -5
- package/@types/synchronizers/synchronizer-ws-server-simple/index.d.ts +4 -5
- package/@types/synchronizers/synchronizer-ws-server-simple/with-schemas/index.d.cts +4 -5
- package/@types/synchronizers/synchronizer-ws-server-simple/with-schemas/index.d.ts +4 -5
- package/@types/synchronizers/with-schemas/index.d.cts +10 -11
- package/@types/synchronizers/with-schemas/index.d.ts +10 -11
- package/@types/ui-react/index.d.cts +489 -490
- package/@types/ui-react/index.d.ts +489 -490
- package/@types/ui-react/with-schemas/index.d.cts +494 -495
- package/@types/ui-react/with-schemas/index.d.ts +494 -495
- package/@types/ui-react-dom/index.d.cts +39 -40
- package/@types/ui-react-dom/index.d.ts +39 -40
- package/@types/ui-react-dom/with-schemas/index.d.cts +39 -40
- package/@types/ui-react-dom/with-schemas/index.d.ts +39 -40
- package/@types/ui-react-inspector/index.d.cts +2 -3
- package/@types/ui-react-inspector/index.d.ts +2 -3
- package/@types/ui-react-inspector/with-schemas/index.d.cts +41 -42
- package/@types/ui-react-inspector/with-schemas/index.d.ts +41 -42
- package/checkpoints/index.js +9 -9
- package/checkpoints/with-schemas/index.js +9 -9
- package/index.js +110 -110
- package/indexes/index.js +3 -3
- package/indexes/with-schemas/index.js +3 -3
- package/mergeable-store/index.js +150 -150
- package/mergeable-store/with-schemas/index.js +150 -150
- package/metrics/index.js +3 -3
- package/metrics/with-schemas/index.js +3 -3
- package/min/checkpoints/index.js +1 -1
- package/min/checkpoints/index.js.gz +0 -0
- package/min/checkpoints/with-schemas/index.js +1 -1
- package/min/checkpoints/with-schemas/index.js.gz +0 -0
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/indexes/index.js +1 -1
- package/min/indexes/index.js.gz +0 -0
- package/min/indexes/with-schemas/index.js +1 -1
- package/min/indexes/with-schemas/index.js.gz +0 -0
- package/min/mergeable-store/index.js +1 -1
- package/min/mergeable-store/index.js.gz +0 -0
- package/min/mergeable-store/with-schemas/index.js +1 -1
- package/min/mergeable-store/with-schemas/index.js.gz +0 -0
- package/min/metrics/index.js +1 -1
- package/min/metrics/index.js.gz +0 -0
- package/min/metrics/with-schemas/index.js +1 -1
- package/min/metrics/with-schemas/index.js.gz +0 -0
- package/min/persisters/index.js +1 -1
- package/min/persisters/index.js.gz +0 -0
- package/min/persisters/persister-automerge/index.js +1 -1
- package/min/persisters/persister-automerge/index.js.gz +0 -0
- package/min/persisters/persister-automerge/with-schemas/index.js +1 -1
- package/min/persisters/persister-automerge/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-browser/index.js +1 -1
- package/min/persisters/persister-browser/index.js.gz +0 -0
- package/min/persisters/persister-browser/with-schemas/index.js +1 -1
- package/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-storage/index.js +1 -1
- package/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
- package/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/index.js +1 -1
- package/min/persisters/persister-electric-sql/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/with-schemas/index.js +1 -1
- package/min/persisters/persister-electric-sql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-file/index.js +1 -1
- package/min/persisters/persister-file/index.js.gz +0 -0
- package/min/persisters/persister-file/with-schemas/index.js +1 -1
- package/min/persisters/persister-file/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-indexed-db/index.js +1 -1
- package/min/persisters/persister-indexed-db/index.js.gz +0 -0
- package/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
- package/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-libsql/index.js +1 -1
- package/min/persisters/persister-libsql/index.js.gz +0 -0
- package/min/persisters/persister-libsql/with-schemas/index.js +1 -1
- package/min/persisters/persister-libsql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-partykit-client/index.js +1 -1
- package/min/persisters/persister-partykit-client/index.js.gz +0 -0
- package/min/persisters/persister-partykit-client/with-schemas/index.js +1 -1
- package/min/persisters/persister-partykit-client/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-partykit-server/index.js +1 -1
- package/min/persisters/persister-partykit-server/index.js.gz +0 -0
- package/min/persisters/persister-partykit-server/with-schemas/index.js +1 -1
- package/min/persisters/persister-partykit-server/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-pglite/index.js +1 -1
- package/min/persisters/persister-pglite/index.js.gz +0 -0
- package/min/persisters/persister-pglite/with-schemas/index.js +1 -1
- package/min/persisters/persister-pglite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-postgres/index.js +1 -1
- package/min/persisters/persister-postgres/index.js.gz +0 -0
- package/min/persisters/persister-postgres/with-schemas/index.js +1 -1
- package/min/persisters/persister-postgres/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-powersync/index.js +1 -1
- package/min/persisters/persister-powersync/index.js.gz +0 -0
- package/min/persisters/persister-powersync/with-schemas/index.js +1 -1
- package/min/persisters/persister-powersync/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-remote/index.js +1 -1
- package/min/persisters/persister-remote/index.js.gz +0 -0
- package/min/persisters/persister-remote/with-schemas/index.js +1 -1
- package/min/persisters/persister-remote/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/index.js +1 -1
- package/min/persisters/persister-sqlite3/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite3/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-yjs/index.js +1 -1
- package/min/persisters/persister-yjs/index.js.gz +0 -0
- package/min/persisters/persister-yjs/with-schemas/index.js +1 -1
- package/min/persisters/persister-yjs/with-schemas/index.js.gz +0 -0
- package/min/persisters/with-schemas/index.js +1 -1
- package/min/persisters/with-schemas/index.js.gz +0 -0
- package/min/queries/index.js +1 -1
- package/min/queries/index.js.gz +0 -0
- package/min/queries/with-schemas/index.js +1 -1
- package/min/queries/with-schemas/index.js.gz +0 -0
- package/min/relationships/index.js +1 -1
- package/min/relationships/index.js.gz +0 -0
- package/min/relationships/with-schemas/index.js +1 -1
- package/min/relationships/with-schemas/index.js.gz +0 -0
- package/min/store/index.js +1 -1
- package/min/store/index.js.gz +0 -0
- package/min/store/with-schemas/index.js +1 -1
- package/min/store/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/index.js +1 -1
- package/min/synchronizers/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/index.js +1 -1
- package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-simple/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-simple/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/with-schemas/index.js +1 -1
- package/min/synchronizers/with-schemas/index.js.gz +0 -0
- package/min/ui-react/index.js +1 -1
- package/min/ui-react/index.js.gz +0 -0
- package/min/ui-react/with-schemas/index.js +1 -1
- package/min/ui-react/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom/index.js +1 -1
- package/min/ui-react-dom/index.js.gz +0 -0
- package/min/ui-react-dom/with-schemas/index.js +1 -1
- package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-react-inspector/index.js +1 -1
- package/min/ui-react-inspector/index.js.gz +0 -0
- package/min/ui-react-inspector/with-schemas/index.js +1 -1
- package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/package.json +6 -6
- package/persisters/index.js +120 -120
- package/persisters/persister-automerge/index.js +8 -8
- package/persisters/persister-automerge/with-schemas/index.js +8 -8
- package/persisters/persister-browser/index.js +8 -8
- package/persisters/persister-browser/with-schemas/index.js +8 -8
- package/persisters/persister-cr-sqlite-wasm/index.js +119 -119
- package/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +119 -119
- package/persisters/persister-durable-object-storage/index.js +12 -12
- package/persisters/persister-durable-object-storage/with-schemas/index.js +12 -12
- package/persisters/persister-electric-sql/index.js +119 -119
- package/persisters/persister-electric-sql/with-schemas/index.js +119 -119
- package/persisters/persister-expo-sqlite/index.js +119 -119
- package/persisters/persister-expo-sqlite/with-schemas/index.js +119 -119
- package/persisters/persister-file/index.js +10 -10
- package/persisters/persister-file/with-schemas/index.js +10 -10
- package/persisters/persister-indexed-db/index.js +8 -8
- package/persisters/persister-indexed-db/with-schemas/index.js +8 -8
- package/persisters/persister-libsql/index.js +119 -119
- package/persisters/persister-libsql/with-schemas/index.js +119 -119
- package/persisters/persister-partykit-client/index.js +23 -23
- package/persisters/persister-partykit-client/with-schemas/index.js +23 -23
- package/persisters/persister-partykit-server/index.js +13 -9
- package/persisters/persister-partykit-server/with-schemas/index.js +13 -9
- package/persisters/persister-pglite/index.js +128 -128
- package/persisters/persister-pglite/with-schemas/index.js +128 -128
- package/persisters/persister-postgres/index.js +128 -128
- package/persisters/persister-postgres/with-schemas/index.js +128 -128
- package/persisters/persister-powersync/index.js +119 -119
- package/persisters/persister-powersync/with-schemas/index.js +119 -119
- package/persisters/persister-remote/index.js +8 -8
- package/persisters/persister-remote/with-schemas/index.js +8 -8
- package/persisters/persister-sqlite-wasm/index.js +119 -119
- package/persisters/persister-sqlite-wasm/with-schemas/index.js +119 -119
- package/persisters/persister-sqlite3/index.js +119 -119
- package/persisters/persister-sqlite3/with-schemas/index.js +119 -119
- package/persisters/persister-yjs/index.js +14 -14
- package/persisters/persister-yjs/with-schemas/index.js +14 -14
- package/persisters/with-schemas/index.js +120 -120
- package/queries/index.js +16 -16
- package/queries/with-schemas/index.js +16 -16
- package/readme.md +13 -32
- package/relationships/index.js +3 -3
- package/relationships/with-schemas/index.js +3 -3
- package/releases.md +35 -34
- package/store/index.js +43 -43
- package/store/with-schemas/index.js +43 -43
- package/synchronizers/index.js +31 -31
- package/synchronizers/synchronizer-broadcast-channel/index.js +31 -31
- package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +31 -31
- package/synchronizers/synchronizer-local/index.js +31 -31
- package/synchronizers/synchronizer-local/with-schemas/index.js +31 -31
- package/synchronizers/synchronizer-ws-client/index.js +25 -25
- package/synchronizers/synchronizer-ws-client/with-schemas/index.js +25 -25
- package/synchronizers/synchronizer-ws-server/index.js +65 -65
- package/synchronizers/synchronizer-ws-server/with-schemas/index.js +65 -65
- package/synchronizers/synchronizer-ws-server-durable-object/index.js +25 -25
- package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +25 -25
- package/synchronizers/synchronizer-ws-server-simple/index.js +3 -3
- package/synchronizers/synchronizer-ws-server-simple/with-schemas/index.js +3 -3
- package/synchronizers/with-schemas/index.js +31 -31
- package/ui-react/index.js +31 -34
- package/ui-react/with-schemas/index.js +31 -34
- package/ui-react-dom/index.js +24 -24
- package/ui-react-dom/with-schemas/index.js +24 -24
- package/ui-react-inspector/index.js +3066 -3067
- package/ui-react-inspector/with-schemas/index.js +3066 -3067
- package/with-schemas/index.js +110 -110
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
* @module ui-react
|
|
23
23
|
* @since v1.0.0
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
25
|
import type {
|
|
27
26
|
AllCellIdFromSchema,
|
|
28
27
|
CellIdFromSchema,
|
|
@@ -31,14 +30,6 @@ import type {
|
|
|
31
30
|
TableIdFromSchema,
|
|
32
31
|
ValueIdFromSchema,
|
|
33
32
|
} from '../../_internal/store/with-schemas/index.d.cts';
|
|
34
|
-
import type {
|
|
35
|
-
AnyPersister,
|
|
36
|
-
PersistedStore,
|
|
37
|
-
Persister,
|
|
38
|
-
Persists,
|
|
39
|
-
Status,
|
|
40
|
-
StatusListener,
|
|
41
|
-
} from '../../persisters/with-schemas/index.d.cts';
|
|
42
33
|
import type {
|
|
43
34
|
BackwardCheckpointsProps,
|
|
44
35
|
CellProps,
|
|
@@ -75,6 +66,12 @@ import type {
|
|
|
75
66
|
ValueProps,
|
|
76
67
|
ValuesProps,
|
|
77
68
|
} from '../../_internal/ui-react/with-schemas/index.d.cts';
|
|
69
|
+
import type {
|
|
70
|
+
CheckpointIds,
|
|
71
|
+
CheckpointIdsListener,
|
|
72
|
+
CheckpointListener,
|
|
73
|
+
Checkpoints,
|
|
74
|
+
} from '../../checkpoints/with-schemas/index.d.cts';
|
|
78
75
|
import type {
|
|
79
76
|
Callback,
|
|
80
77
|
Id,
|
|
@@ -82,6 +79,44 @@ import type {
|
|
|
82
79
|
Ids,
|
|
83
80
|
ParameterizedCallback,
|
|
84
81
|
} from '../../common/with-schemas/index.d.cts';
|
|
82
|
+
import type {
|
|
83
|
+
Indexes,
|
|
84
|
+
SliceIdsListener,
|
|
85
|
+
SliceRowIdsListener,
|
|
86
|
+
} from '../../indexes/with-schemas/index.d.cts';
|
|
87
|
+
import type {MergeableStore} from '../../mergeable-store/with-schemas/index.d.cts';
|
|
88
|
+
import type {
|
|
89
|
+
MetricListener,
|
|
90
|
+
Metrics,
|
|
91
|
+
} from '../../metrics/with-schemas/index.d.cts';
|
|
92
|
+
import type {
|
|
93
|
+
AnyPersister,
|
|
94
|
+
PersistedStore,
|
|
95
|
+
Persister,
|
|
96
|
+
Persists,
|
|
97
|
+
Status,
|
|
98
|
+
StatusListener,
|
|
99
|
+
} from '../../persisters/with-schemas/index.d.cts';
|
|
100
|
+
import type {
|
|
101
|
+
Queries,
|
|
102
|
+
ResultCell,
|
|
103
|
+
ResultCellIdsListener,
|
|
104
|
+
ResultCellListener,
|
|
105
|
+
ResultRow,
|
|
106
|
+
ResultRowCountListener,
|
|
107
|
+
ResultRowIdsListener,
|
|
108
|
+
ResultRowListener,
|
|
109
|
+
ResultSortedRowIdsListener,
|
|
110
|
+
ResultTable,
|
|
111
|
+
ResultTableCellIdsListener,
|
|
112
|
+
ResultTableListener,
|
|
113
|
+
} from '../../queries/with-schemas/index.d.cts';
|
|
114
|
+
import type {
|
|
115
|
+
LinkedRowIdsListener,
|
|
116
|
+
LocalRowIdsListener,
|
|
117
|
+
Relationships,
|
|
118
|
+
RemoteRowIdListener,
|
|
119
|
+
} from '../../relationships/with-schemas/index.d.cts';
|
|
85
120
|
import type {
|
|
86
121
|
Cell,
|
|
87
122
|
CellIdsListener,
|
|
@@ -116,44 +151,8 @@ import type {
|
|
|
116
151
|
Values,
|
|
117
152
|
ValuesListener,
|
|
118
153
|
} from '../../store/with-schemas/index.d.cts';
|
|
119
|
-
import type {
|
|
120
|
-
CheckpointIds,
|
|
121
|
-
CheckpointIdsListener,
|
|
122
|
-
CheckpointListener,
|
|
123
|
-
Checkpoints,
|
|
124
|
-
} from '../../checkpoints/with-schemas/index.d.cts';
|
|
125
|
-
import type {
|
|
126
|
-
Indexes,
|
|
127
|
-
SliceIdsListener,
|
|
128
|
-
SliceRowIdsListener,
|
|
129
|
-
} from '../../indexes/with-schemas/index.d.cts';
|
|
130
|
-
import type {
|
|
131
|
-
LinkedRowIdsListener,
|
|
132
|
-
LocalRowIdsListener,
|
|
133
|
-
Relationships,
|
|
134
|
-
RemoteRowIdListener,
|
|
135
|
-
} from '../../relationships/with-schemas/index.d.cts';
|
|
136
|
-
import type {
|
|
137
|
-
MetricListener,
|
|
138
|
-
Metrics,
|
|
139
|
-
} from '../../metrics/with-schemas/index.d.cts';
|
|
140
|
-
import type {
|
|
141
|
-
Queries,
|
|
142
|
-
ResultCell,
|
|
143
|
-
ResultCellIdsListener,
|
|
144
|
-
ResultCellListener,
|
|
145
|
-
ResultRow,
|
|
146
|
-
ResultRowCountListener,
|
|
147
|
-
ResultRowIdsListener,
|
|
148
|
-
ResultRowListener,
|
|
149
|
-
ResultSortedRowIdsListener,
|
|
150
|
-
ResultTable,
|
|
151
|
-
ResultTableCellIdsListener,
|
|
152
|
-
ResultTableListener,
|
|
153
|
-
} from '../../queries/with-schemas/index.d.cts';
|
|
154
|
-
import type {MergeableStore} from '../../mergeable-store/with-schemas/index.d.cts';
|
|
155
|
-
import type {ReactElement} from 'react';
|
|
156
154
|
import type {Synchronizer} from '../../synchronizers/with-schemas/index.d.cts';
|
|
155
|
+
import type {ReactElement} from 'react';
|
|
157
156
|
|
|
158
157
|
export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
159
158
|
/**
|
|
@@ -497,10 +496,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
497
496
|
* component accesses their Ids.
|
|
498
497
|
*
|
|
499
498
|
* ```jsx
|
|
500
|
-
* import {Provider, useCreateStore, useStoreIds} from 'tinybase/ui-react';
|
|
501
499
|
* import React from 'react';
|
|
502
500
|
* import {createRoot} from 'react-dom/client';
|
|
503
501
|
* import {createStore} from 'tinybase';
|
|
502
|
+
* import {Provider, useCreateStore, useStoreIds} from 'tinybase/ui-react';
|
|
504
503
|
*
|
|
505
504
|
* const App = () => {
|
|
506
505
|
* const store1 = useCreateStore(createStore);
|
|
@@ -551,10 +550,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
551
550
|
* reference to the Store again, without the need to have it passed as a prop.
|
|
552
551
|
*
|
|
553
552
|
* ```jsx
|
|
554
|
-
* import {Provider, useStore} from 'tinybase/ui-react';
|
|
555
553
|
* import React from 'react';
|
|
556
554
|
* import {createRoot} from 'react-dom/client';
|
|
557
555
|
* import {createStore} from 'tinybase';
|
|
556
|
+
* import {Provider, useStore} from 'tinybase/ui-react';
|
|
558
557
|
*
|
|
559
558
|
* const App = ({store}) => (
|
|
560
559
|
* <Provider store={store}>
|
|
@@ -575,10 +574,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
575
574
|
* a reference to the Store again, without the need to have it passed as a prop.
|
|
576
575
|
*
|
|
577
576
|
* ```jsx
|
|
578
|
-
* import {Provider, useStore} from 'tinybase/ui-react';
|
|
579
577
|
* import React from 'react';
|
|
580
578
|
* import {createRoot} from 'react-dom/client';
|
|
581
579
|
* import {createStore} from 'tinybase';
|
|
580
|
+
* import {Provider, useStore} from 'tinybase/ui-react';
|
|
582
581
|
*
|
|
583
582
|
* const App = ({store}) => (
|
|
584
583
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -623,10 +622,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
623
622
|
* to the Store again.
|
|
624
623
|
*
|
|
625
624
|
* ```jsx
|
|
626
|
-
* import {Provider, useStores} from 'tinybase/ui-react';
|
|
627
625
|
* import React from 'react';
|
|
628
626
|
* import {createRoot} from 'react-dom/client';
|
|
629
627
|
* import {createStore} from 'tinybase';
|
|
628
|
+
* import {Provider, useStores} from 'tinybase/ui-react';
|
|
630
629
|
*
|
|
631
630
|
* const App = ({store}) => (
|
|
632
631
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -681,10 +680,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
681
680
|
* it more portable.
|
|
682
681
|
*
|
|
683
682
|
* ```jsx
|
|
684
|
-
* import {Provider, useStoreOrStoreById} from 'tinybase/ui-react';
|
|
685
683
|
* import React from 'react';
|
|
686
684
|
* import {createRoot} from 'react-dom/client';
|
|
687
685
|
* import {createStore} from 'tinybase';
|
|
686
|
+
* import {Provider, useStoreOrStoreById} from 'tinybase/ui-react';
|
|
688
687
|
*
|
|
689
688
|
* const App = ({store}) => (
|
|
690
689
|
* <Provider store={store}>
|
|
@@ -740,15 +739,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
740
739
|
* This example creates a Provider context. A child component registers a Store
|
|
741
740
|
* into it which is then consumable by a peer child component.
|
|
742
741
|
* ```jsx
|
|
742
|
+
* import React from 'react';
|
|
743
|
+
* import {createRoot} from 'react-dom/client';
|
|
744
|
+
* import {createStore} from 'tinybase';
|
|
743
745
|
* import {
|
|
744
746
|
* Provider,
|
|
745
747
|
* useCreateStore,
|
|
746
748
|
* useProvideStore,
|
|
747
749
|
* useStore,
|
|
748
750
|
* } from 'tinybase/ui-react';
|
|
749
|
-
* import React from 'react';
|
|
750
|
-
* import {createRoot} from 'react-dom/client';
|
|
751
|
-
* import {createStore} from 'tinybase';
|
|
752
751
|
*
|
|
753
752
|
* const App = () => (
|
|
754
753
|
* <Provider>
|
|
@@ -831,10 +830,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
831
830
|
* provided. A component within it then uses the useHasTables hook.
|
|
832
831
|
*
|
|
833
832
|
* ```jsx
|
|
834
|
-
* import {Provider, useHasTables} from 'tinybase/ui-react';
|
|
835
833
|
* import React from 'react';
|
|
836
834
|
* import {createRoot} from 'react-dom/client';
|
|
837
835
|
* import {createStore} from 'tinybase';
|
|
836
|
+
* import {Provider, useHasTables} from 'tinybase/ui-react';
|
|
838
837
|
*
|
|
839
838
|
* const App = ({store}) => (
|
|
840
839
|
* <Provider store={store}>
|
|
@@ -854,10 +853,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
854
853
|
* by Id. A component within it then uses the useHasTables hook.
|
|
855
854
|
*
|
|
856
855
|
* ```jsx
|
|
857
|
-
* import {Provider, useHasTables} from 'tinybase/ui-react';
|
|
858
856
|
* import React from 'react';
|
|
859
857
|
* import {createRoot} from 'react-dom/client';
|
|
860
858
|
* import {createStore} from 'tinybase';
|
|
859
|
+
* import {Provider, useHasTables} from 'tinybase/ui-react';
|
|
861
860
|
*
|
|
862
861
|
* const App = ({store}) => (
|
|
863
862
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -930,10 +929,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
930
929
|
* provided. A component within it then uses the useTables hook.
|
|
931
930
|
*
|
|
932
931
|
* ```jsx
|
|
933
|
-
* import {Provider, useTables} from 'tinybase/ui-react';
|
|
934
932
|
* import React from 'react';
|
|
935
933
|
* import {createRoot} from 'react-dom/client';
|
|
936
934
|
* import {createStore} from 'tinybase';
|
|
935
|
+
* import {Provider, useTables} from 'tinybase/ui-react';
|
|
937
936
|
*
|
|
938
937
|
* const App = ({store}) => (
|
|
939
938
|
* <Provider store={store}>
|
|
@@ -953,10 +952,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
953
952
|
* by Id. A component within it then uses the useTables hook.
|
|
954
953
|
*
|
|
955
954
|
* ```jsx
|
|
956
|
-
* import {Provider, useTables} from 'tinybase/ui-react';
|
|
957
955
|
* import React from 'react';
|
|
958
956
|
* import {createRoot} from 'react-dom/client';
|
|
959
957
|
* import {createStore} from 'tinybase';
|
|
958
|
+
* import {Provider, useTables} from 'tinybase/ui-react';
|
|
960
959
|
*
|
|
961
960
|
* const App = ({store}) => (
|
|
962
961
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1027,10 +1026,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1027
1026
|
* provided. A component within it then uses the useTableIds hook.
|
|
1028
1027
|
*
|
|
1029
1028
|
* ```jsx
|
|
1030
|
-
* import {Provider, useTableIds} from 'tinybase/ui-react';
|
|
1031
1029
|
* import React from 'react';
|
|
1032
1030
|
* import {createRoot} from 'react-dom/client';
|
|
1033
1031
|
* import {createStore} from 'tinybase';
|
|
1032
|
+
* import {Provider, useTableIds} from 'tinybase/ui-react';
|
|
1034
1033
|
*
|
|
1035
1034
|
* const App = ({store}) => (
|
|
1036
1035
|
* <Provider store={store}>
|
|
@@ -1050,10 +1049,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1050
1049
|
* by Id. A component within it then uses the useTableIds hook.
|
|
1051
1050
|
*
|
|
1052
1051
|
* ```jsx
|
|
1053
|
-
* import {Provider, useTableIds} from 'tinybase/ui-react';
|
|
1054
1052
|
* import React from 'react';
|
|
1055
1053
|
* import {createRoot} from 'react-dom/client';
|
|
1056
1054
|
* import {createStore} from 'tinybase';
|
|
1055
|
+
* import {Provider, useTableIds} from 'tinybase/ui-react';
|
|
1057
1056
|
*
|
|
1058
1057
|
* const App = ({store}) => (
|
|
1059
1058
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1134,10 +1133,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1134
1133
|
* provided. A component within it then uses the useHasTable hook.
|
|
1135
1134
|
*
|
|
1136
1135
|
* ```jsx
|
|
1137
|
-
* import {Provider, useHasTable} from 'tinybase/ui-react';
|
|
1138
1136
|
* import React from 'react';
|
|
1139
1137
|
* import {createRoot} from 'react-dom/client';
|
|
1140
1138
|
* import {createStore} from 'tinybase';
|
|
1139
|
+
* import {Provider, useHasTable} from 'tinybase/ui-react';
|
|
1141
1140
|
*
|
|
1142
1141
|
* const App = ({store}) => (
|
|
1143
1142
|
* <Provider store={store}>
|
|
@@ -1157,10 +1156,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1157
1156
|
* by Id. A component within it then uses the useHasTable hook.
|
|
1158
1157
|
*
|
|
1159
1158
|
* ```jsx
|
|
1160
|
-
* import {Provider, useHasTable} from 'tinybase/ui-react';
|
|
1161
1159
|
* import React from 'react';
|
|
1162
1160
|
* import {createRoot} from 'react-dom/client';
|
|
1163
1161
|
* import {createStore} from 'tinybase';
|
|
1162
|
+
* import {Provider, useHasTable} from 'tinybase/ui-react';
|
|
1164
1163
|
*
|
|
1165
1164
|
* const App = ({store}) => (
|
|
1166
1165
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1238,10 +1237,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1238
1237
|
* provided. A component within it then uses the useTable hook.
|
|
1239
1238
|
*
|
|
1240
1239
|
* ```jsx
|
|
1241
|
-
* import {Provider, useTable} from 'tinybase/ui-react';
|
|
1242
1240
|
* import React from 'react';
|
|
1243
1241
|
* import {createRoot} from 'react-dom/client';
|
|
1244
1242
|
* import {createStore} from 'tinybase';
|
|
1243
|
+
* import {Provider, useTable} from 'tinybase/ui-react';
|
|
1245
1244
|
*
|
|
1246
1245
|
* const App = ({store}) => (
|
|
1247
1246
|
* <Provider store={store}>
|
|
@@ -1261,10 +1260,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1261
1260
|
* by Id. A component within it then uses the useTable hook.
|
|
1262
1261
|
*
|
|
1263
1262
|
* ```jsx
|
|
1264
|
-
* import {Provider, useTable} from 'tinybase/ui-react';
|
|
1265
1263
|
* import React from 'react';
|
|
1266
1264
|
* import {createRoot} from 'react-dom/client';
|
|
1267
1265
|
* import {createStore} from 'tinybase';
|
|
1266
|
+
* import {Provider, useTable} from 'tinybase/ui-react';
|
|
1268
1267
|
*
|
|
1269
1268
|
* const App = ({store}) => (
|
|
1270
1269
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1347,10 +1346,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1347
1346
|
* provided. A component within it then uses the useTableCellIds hook.
|
|
1348
1347
|
*
|
|
1349
1348
|
* ```jsx
|
|
1350
|
-
* import {Provider, useTableCellIds} from 'tinybase/ui-react';
|
|
1351
1349
|
* import React from 'react';
|
|
1352
1350
|
* import {createRoot} from 'react-dom/client';
|
|
1353
1351
|
* import {createStore} from 'tinybase';
|
|
1352
|
+
* import {Provider, useTableCellIds} from 'tinybase/ui-react';
|
|
1354
1353
|
*
|
|
1355
1354
|
* const App = ({store}) => (
|
|
1356
1355
|
* <Provider store={store}>
|
|
@@ -1370,10 +1369,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1370
1369
|
* by Id. A component within it then uses the useTableCellIds hook.
|
|
1371
1370
|
*
|
|
1372
1371
|
* ```jsx
|
|
1373
|
-
* import {Provider, useTableCellIds} from 'tinybase/ui-react';
|
|
1374
1372
|
* import React from 'react';
|
|
1375
1373
|
* import {createRoot} from 'react-dom/client';
|
|
1376
1374
|
* import {createStore} from 'tinybase';
|
|
1375
|
+
* import {Provider, useTableCellIds} from 'tinybase/ui-react';
|
|
1377
1376
|
*
|
|
1378
1377
|
* const App = ({store}) => (
|
|
1379
1378
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1459,10 +1458,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1459
1458
|
* provided. A component within it then uses the useHasTableCell hook.
|
|
1460
1459
|
*
|
|
1461
1460
|
* ```jsx
|
|
1462
|
-
* import {Provider, useHasTableCell} from 'tinybase/ui-react';
|
|
1463
1461
|
* import React from 'react';
|
|
1464
1462
|
* import {createRoot} from 'react-dom/client';
|
|
1465
1463
|
* import {createStore} from 'tinybase';
|
|
1464
|
+
* import {Provider, useHasTableCell} from 'tinybase/ui-react';
|
|
1466
1465
|
*
|
|
1467
1466
|
* const App = ({store}) => (
|
|
1468
1467
|
* <Provider store={store}>
|
|
@@ -1484,10 +1483,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1484
1483
|
* by Id. A component within it then uses the useHasTableCell hook.
|
|
1485
1484
|
*
|
|
1486
1485
|
* ```jsx
|
|
1487
|
-
* import {Provider, useHasTableCell} from 'tinybase/ui-react';
|
|
1488
1486
|
* import React from 'react';
|
|
1489
1487
|
* import {createRoot} from 'react-dom/client';
|
|
1490
1488
|
* import {createStore} from 'tinybase';
|
|
1489
|
+
* import {Provider, useHasTableCell} from 'tinybase/ui-react';
|
|
1491
1490
|
*
|
|
1492
1491
|
* const App = ({store}) => (
|
|
1493
1492
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1571,10 +1570,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1571
1570
|
* provided. A component within it then uses the useRowCount hook.
|
|
1572
1571
|
*
|
|
1573
1572
|
* ```jsx
|
|
1574
|
-
* import {Provider, useRowCount} from 'tinybase/ui-react';
|
|
1575
1573
|
* import React from 'react';
|
|
1576
1574
|
* import {createRoot} from 'react-dom/client';
|
|
1577
1575
|
* import {createStore} from 'tinybase';
|
|
1576
|
+
* import {Provider, useRowCount} from 'tinybase/ui-react';
|
|
1578
1577
|
*
|
|
1579
1578
|
* const App = ({store}) => (
|
|
1580
1579
|
* <Provider store={store}>
|
|
@@ -1594,10 +1593,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1594
1593
|
* by Id. A component within it then uses the useRowCount hook.
|
|
1595
1594
|
*
|
|
1596
1595
|
* ```jsx
|
|
1597
|
-
* import {Provider, useRowCount} from 'tinybase/ui-react';
|
|
1598
1596
|
* import React from 'react';
|
|
1599
1597
|
* import {createRoot} from 'react-dom/client';
|
|
1600
1598
|
* import {createStore} from 'tinybase';
|
|
1599
|
+
* import {Provider, useRowCount} from 'tinybase/ui-react';
|
|
1601
1600
|
*
|
|
1602
1601
|
* const App = ({store}) => (
|
|
1603
1602
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1673,10 +1672,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1673
1672
|
* provided. A component within it then uses the useRowIds hook.
|
|
1674
1673
|
*
|
|
1675
1674
|
* ```jsx
|
|
1676
|
-
* import {Provider, useRowIds} from 'tinybase/ui-react';
|
|
1677
1675
|
* import React from 'react';
|
|
1678
1676
|
* import {createRoot} from 'react-dom/client';
|
|
1679
1677
|
* import {createStore} from 'tinybase';
|
|
1678
|
+
* import {Provider, useRowIds} from 'tinybase/ui-react';
|
|
1680
1679
|
*
|
|
1681
1680
|
* const App = ({store}) => (
|
|
1682
1681
|
* <Provider store={store}>
|
|
@@ -1696,10 +1695,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1696
1695
|
* by Id. A component within it then uses the useRowIds hook.
|
|
1697
1696
|
*
|
|
1698
1697
|
* ```jsx
|
|
1699
|
-
* import {Provider, useRowIds} from 'tinybase/ui-react';
|
|
1700
1698
|
* import React from 'react';
|
|
1701
1699
|
* import {createRoot} from 'react-dom/client';
|
|
1702
1700
|
* import {createStore} from 'tinybase';
|
|
1701
|
+
* import {Provider, useRowIds} from 'tinybase/ui-react';
|
|
1703
1702
|
*
|
|
1704
1703
|
* const App = ({store}) => (
|
|
1705
1704
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1800,10 +1799,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1800
1799
|
* provided. A component within it then uses the useSortedRowIds hook.
|
|
1801
1800
|
*
|
|
1802
1801
|
* ```jsx
|
|
1803
|
-
* import {Provider, useSortedRowIds} from 'tinybase/ui-react';
|
|
1804
1802
|
* import React from 'react';
|
|
1805
1803
|
* import {createRoot} from 'react-dom/client';
|
|
1806
1804
|
* import {createStore} from 'tinybase';
|
|
1805
|
+
* import {Provider, useSortedRowIds} from 'tinybase/ui-react';
|
|
1807
1806
|
*
|
|
1808
1807
|
* const App = ({store}) => (
|
|
1809
1808
|
* <Provider store={store}>
|
|
@@ -1828,10 +1827,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1828
1827
|
* by Id. A component within it then uses the useSortedRowIds hook.
|
|
1829
1828
|
*
|
|
1830
1829
|
* ```jsx
|
|
1831
|
-
* import {Provider, useSortedRowIds} from 'tinybase/ui-react';
|
|
1832
1830
|
* import React from 'react';
|
|
1833
1831
|
* import {createRoot} from 'react-dom/client';
|
|
1834
1832
|
* import {createStore} from 'tinybase';
|
|
1833
|
+
* import {Provider, useSortedRowIds} from 'tinybase/ui-react';
|
|
1835
1834
|
*
|
|
1836
1835
|
* const App = ({store}) => (
|
|
1837
1836
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -1933,10 +1932,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1933
1932
|
* provided. A component within it then uses the useHasRow hook.
|
|
1934
1933
|
*
|
|
1935
1934
|
* ```jsx
|
|
1936
|
-
* import {Provider, useHasRow} from 'tinybase/ui-react';
|
|
1937
1935
|
* import React from 'react';
|
|
1938
1936
|
* import {createRoot} from 'react-dom/client';
|
|
1939
1937
|
* import {createStore} from 'tinybase';
|
|
1938
|
+
* import {Provider, useHasRow} from 'tinybase/ui-react';
|
|
1940
1939
|
*
|
|
1941
1940
|
* const App = ({store}) => (
|
|
1942
1941
|
* <Provider store={store}>
|
|
@@ -1958,10 +1957,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1958
1957
|
* by Id. A component within it then uses the useHasRow hook.
|
|
1959
1958
|
*
|
|
1960
1959
|
* ```jsx
|
|
1961
|
-
* import {Provider, useHasRow} from 'tinybase/ui-react';
|
|
1962
1960
|
* import React from 'react';
|
|
1963
1961
|
* import {createRoot} from 'react-dom/client';
|
|
1964
1962
|
* import {createStore} from 'tinybase';
|
|
1963
|
+
* import {Provider, useHasRow} from 'tinybase/ui-react';
|
|
1965
1964
|
*
|
|
1966
1965
|
* const App = ({store}) => (
|
|
1967
1966
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2047,10 +2046,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2047
2046
|
* provided. A component within it then uses the useRow hook.
|
|
2048
2047
|
*
|
|
2049
2048
|
* ```jsx
|
|
2050
|
-
* import {Provider, useRow} from 'tinybase/ui-react';
|
|
2051
2049
|
* import React from 'react';
|
|
2052
2050
|
* import {createRoot} from 'react-dom/client';
|
|
2053
2051
|
* import {createStore} from 'tinybase';
|
|
2052
|
+
* import {Provider, useRow} from 'tinybase/ui-react';
|
|
2054
2053
|
*
|
|
2055
2054
|
* const App = ({store}) => (
|
|
2056
2055
|
* <Provider store={store}>
|
|
@@ -2070,10 +2069,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2070
2069
|
* by Id. A component within it then uses the useRow hook.
|
|
2071
2070
|
*
|
|
2072
2071
|
* ```jsx
|
|
2073
|
-
* import {Provider, useRow} from 'tinybase/ui-react';
|
|
2074
2072
|
* import React from 'react';
|
|
2075
2073
|
* import {createRoot} from 'react-dom/client';
|
|
2076
2074
|
* import {createStore} from 'tinybase';
|
|
2075
|
+
* import {Provider, useRow} from 'tinybase/ui-react';
|
|
2077
2076
|
*
|
|
2078
2077
|
* const App = ({store}) => (
|
|
2079
2078
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2159,10 +2158,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2159
2158
|
* provided. A component within it then uses the useCellIds hook.
|
|
2160
2159
|
*
|
|
2161
2160
|
* ```jsx
|
|
2162
|
-
* import {Provider, useCellIds} from 'tinybase/ui-react';
|
|
2163
2161
|
* import React from 'react';
|
|
2164
2162
|
* import {createRoot} from 'react-dom/client';
|
|
2165
2163
|
* import {createStore} from 'tinybase';
|
|
2164
|
+
* import {Provider, useCellIds} from 'tinybase/ui-react';
|
|
2166
2165
|
*
|
|
2167
2166
|
* const App = ({store}) => (
|
|
2168
2167
|
* <Provider store={store}>
|
|
@@ -2184,10 +2183,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2184
2183
|
* by Id. A component within it then uses the useCellIds hook.
|
|
2185
2184
|
*
|
|
2186
2185
|
* ```jsx
|
|
2187
|
-
* import {Provider, useCellIds} from 'tinybase/ui-react';
|
|
2188
2186
|
* import React from 'react';
|
|
2189
2187
|
* import {createRoot} from 'react-dom/client';
|
|
2190
2188
|
* import {createStore} from 'tinybase';
|
|
2189
|
+
* import {Provider, useCellIds} from 'tinybase/ui-react';
|
|
2191
2190
|
*
|
|
2192
2191
|
* const App = ({store}) => (
|
|
2193
2192
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2276,10 +2275,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2276
2275
|
* provided. A component within it then uses the useHasCell hook.
|
|
2277
2276
|
*
|
|
2278
2277
|
* ```jsx
|
|
2279
|
-
* import {Provider, useHasCell} from 'tinybase/ui-react';
|
|
2280
2278
|
* import React from 'react';
|
|
2281
2279
|
* import {createRoot} from 'react-dom/client';
|
|
2282
2280
|
* import {createStore} from 'tinybase';
|
|
2281
|
+
* import {Provider, useHasCell} from 'tinybase/ui-react';
|
|
2283
2282
|
*
|
|
2284
2283
|
* const App = ({store}) => (
|
|
2285
2284
|
* <Provider store={store}>
|
|
@@ -2301,10 +2300,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2301
2300
|
* by Id. A component within it then uses the useHasCell hook.
|
|
2302
2301
|
*
|
|
2303
2302
|
* ```jsx
|
|
2304
|
-
* import {Provider, useHasCell} from 'tinybase/ui-react';
|
|
2305
2303
|
* import React from 'react';
|
|
2306
2304
|
* import {createRoot} from 'react-dom/client';
|
|
2307
2305
|
* import {createStore} from 'tinybase';
|
|
2306
|
+
* import {Provider, useHasCell} from 'tinybase/ui-react';
|
|
2308
2307
|
*
|
|
2309
2308
|
* const App = ({store}) => (
|
|
2310
2309
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2396,10 +2395,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2396
2395
|
* provided. A component within it then uses the useCell hook.
|
|
2397
2396
|
*
|
|
2398
2397
|
* ```jsx
|
|
2399
|
-
* import {Provider, useCell} from 'tinybase/ui-react';
|
|
2400
2398
|
* import React from 'react';
|
|
2401
2399
|
* import {createRoot} from 'react-dom/client';
|
|
2402
2400
|
* import {createStore} from 'tinybase';
|
|
2401
|
+
* import {Provider, useCell} from 'tinybase/ui-react';
|
|
2403
2402
|
*
|
|
2404
2403
|
* const App = ({store}) => (
|
|
2405
2404
|
* <Provider store={store}>
|
|
@@ -2419,10 +2418,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2419
2418
|
* by Id. A component within it then uses the useCell hook.
|
|
2420
2419
|
*
|
|
2421
2420
|
* ```jsx
|
|
2422
|
-
* import {Provider, useCell} from 'tinybase/ui-react';
|
|
2423
2421
|
* import React from 'react';
|
|
2424
2422
|
* import {createRoot} from 'react-dom/client';
|
|
2425
2423
|
* import {createStore} from 'tinybase';
|
|
2424
|
+
* import {Provider, useCell} from 'tinybase/ui-react';
|
|
2426
2425
|
*
|
|
2427
2426
|
* const App = ({store}) => (
|
|
2428
2427
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2505,10 +2504,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2505
2504
|
* provided. A component within it then uses the useHasValues hook.
|
|
2506
2505
|
*
|
|
2507
2506
|
* ```jsx
|
|
2508
|
-
* import {Provider, useHasValues} from 'tinybase/ui-react';
|
|
2509
2507
|
* import React from 'react';
|
|
2510
2508
|
* import {createRoot} from 'react-dom/client';
|
|
2511
2509
|
* import {createStore} from 'tinybase';
|
|
2510
|
+
* import {Provider, useHasValues} from 'tinybase/ui-react';
|
|
2512
2511
|
*
|
|
2513
2512
|
* const App = ({store}) => (
|
|
2514
2513
|
* <Provider store={store}>
|
|
@@ -2528,10 +2527,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2528
2527
|
* by Id. A component within it then uses the useHasValues hook.
|
|
2529
2528
|
*
|
|
2530
2529
|
* ```jsx
|
|
2531
|
-
* import {Provider, useHasValues} from 'tinybase/ui-react';
|
|
2532
2530
|
* import React from 'react';
|
|
2533
2531
|
* import {createRoot} from 'react-dom/client';
|
|
2534
2532
|
* import {createStore} from 'tinybase';
|
|
2533
|
+
* import {Provider, useHasValues} from 'tinybase/ui-react';
|
|
2535
2534
|
*
|
|
2536
2535
|
* const App = ({store}) => (
|
|
2537
2536
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2603,10 +2602,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2603
2602
|
* provided. A component within it then uses the useValues hook.
|
|
2604
2603
|
*
|
|
2605
2604
|
* ```jsx
|
|
2606
|
-
* import {Provider, useValues} from 'tinybase/ui-react';
|
|
2607
2605
|
* import React from 'react';
|
|
2608
2606
|
* import {createRoot} from 'react-dom/client';
|
|
2609
2607
|
* import {createStore} from 'tinybase';
|
|
2608
|
+
* import {Provider, useValues} from 'tinybase/ui-react';
|
|
2610
2609
|
*
|
|
2611
2610
|
* const App = ({store}) => (
|
|
2612
2611
|
* <Provider store={store}>
|
|
@@ -2626,10 +2625,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2626
2625
|
* by Id. A component within it then uses the useValues hook.
|
|
2627
2626
|
*
|
|
2628
2627
|
* ```jsx
|
|
2629
|
-
* import {Provider, useValues} from 'tinybase/ui-react';
|
|
2630
2628
|
* import React from 'react';
|
|
2631
2629
|
* import {createRoot} from 'react-dom/client';
|
|
2632
2630
|
* import {createStore} from 'tinybase';
|
|
2631
|
+
* import {Provider, useValues} from 'tinybase/ui-react';
|
|
2633
2632
|
*
|
|
2634
2633
|
* const App = ({store}) => (
|
|
2635
2634
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2700,10 +2699,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2700
2699
|
* provided. A component within it then uses the useValueIds hook.
|
|
2701
2700
|
*
|
|
2702
2701
|
* ```jsx
|
|
2703
|
-
* import {Provider, useValueIds} from 'tinybase/ui-react';
|
|
2704
2702
|
* import React from 'react';
|
|
2705
2703
|
* import {createRoot} from 'react-dom/client';
|
|
2706
2704
|
* import {createStore} from 'tinybase';
|
|
2705
|
+
* import {Provider, useValueIds} from 'tinybase/ui-react';
|
|
2707
2706
|
*
|
|
2708
2707
|
* const App = ({store}) => (
|
|
2709
2708
|
* <Provider store={store}>
|
|
@@ -2723,10 +2722,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2723
2722
|
* by Id. A component within it then uses the useValueIds hook.
|
|
2724
2723
|
*
|
|
2725
2724
|
* ```jsx
|
|
2726
|
-
* import {Provider, useValueIds} from 'tinybase/ui-react';
|
|
2727
2725
|
* import React from 'react';
|
|
2728
2726
|
* import {createRoot} from 'react-dom/client';
|
|
2729
2727
|
* import {createStore} from 'tinybase';
|
|
2728
|
+
* import {Provider, useValueIds} from 'tinybase/ui-react';
|
|
2730
2729
|
*
|
|
2731
2730
|
* const App = ({store}) => (
|
|
2732
2731
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2807,10 +2806,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2807
2806
|
* provided. A component within it then uses the useHasValue hook.
|
|
2808
2807
|
*
|
|
2809
2808
|
* ```jsx
|
|
2810
|
-
* import {Provider, useHasValue} from 'tinybase/ui-react';
|
|
2811
2809
|
* import React from 'react';
|
|
2812
2810
|
* import {createRoot} from 'react-dom/client';
|
|
2813
2811
|
* import {createStore} from 'tinybase';
|
|
2812
|
+
* import {Provider, useHasValue} from 'tinybase/ui-react';
|
|
2814
2813
|
*
|
|
2815
2814
|
* const App = ({store}) => (
|
|
2816
2815
|
* <Provider store={store}>
|
|
@@ -2830,10 +2829,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2830
2829
|
* by Id. A component within it then uses the useHasValue hook.
|
|
2831
2830
|
*
|
|
2832
2831
|
* ```jsx
|
|
2833
|
-
* import {Provider, useHasValue} from 'tinybase/ui-react';
|
|
2834
2832
|
* import React from 'react';
|
|
2835
2833
|
* import {createRoot} from 'react-dom/client';
|
|
2836
2834
|
* import {createStore} from 'tinybase';
|
|
2835
|
+
* import {Provider, useHasValue} from 'tinybase/ui-react';
|
|
2837
2836
|
*
|
|
2838
2837
|
* const App = ({store}) => (
|
|
2839
2838
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -2914,10 +2913,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2914
2913
|
* provided. A component within it then uses the useValue hook.
|
|
2915
2914
|
*
|
|
2916
2915
|
* ```jsx
|
|
2917
|
-
* import {Provider, useValue} from 'tinybase/ui-react';
|
|
2918
2916
|
* import React from 'react';
|
|
2919
2917
|
* import {createRoot} from 'react-dom/client';
|
|
2920
2918
|
* import {createStore} from 'tinybase';
|
|
2919
|
+
* import {Provider, useValue} from 'tinybase/ui-react';
|
|
2921
2920
|
*
|
|
2922
2921
|
* const App = ({store}) => (
|
|
2923
2922
|
* <Provider store={store}>
|
|
@@ -2937,10 +2936,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2937
2936
|
* by Id. A component within it then uses the useValue hook.
|
|
2938
2937
|
*
|
|
2939
2938
|
* ```jsx
|
|
2940
|
-
* import {Provider, useValue} from 'tinybase/ui-react';
|
|
2941
2939
|
* import React from 'react';
|
|
2942
2940
|
* import {createRoot} from 'react-dom/client';
|
|
2943
2941
|
* import {createStore} from 'tinybase';
|
|
2942
|
+
* import {Provider, useValue} from 'tinybase/ui-react';
|
|
2944
2943
|
*
|
|
2945
2944
|
* const App = ({store}) => (
|
|
2946
2945
|
* <Provider storesById={{petStore: store}}>
|
|
@@ -3021,10 +3020,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3021
3020
|
* which updates the Store when the `span` element is clicked.
|
|
3022
3021
|
*
|
|
3023
3022
|
* ```jsx
|
|
3024
|
-
* import {useSetTablesCallback, useTables} from 'tinybase/ui-react';
|
|
3025
3023
|
* import React from 'react';
|
|
3026
3024
|
* import {createRoot} from 'react-dom/client';
|
|
3027
3025
|
* import {createStore} from 'tinybase';
|
|
3026
|
+
* import {useSetTablesCallback, useTables} from 'tinybase/ui-react';
|
|
3028
3027
|
*
|
|
3029
3028
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
3030
3029
|
* const App = () => {
|
|
@@ -3128,10 +3127,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3128
3127
|
* which updates the Store when the `span` element is clicked.
|
|
3129
3128
|
*
|
|
3130
3129
|
* ```jsx
|
|
3131
|
-
* import {useSetTableCallback, useTable} from 'tinybase/ui-react';
|
|
3132
3130
|
* import React from 'react';
|
|
3133
3131
|
* import {createRoot} from 'react-dom/client';
|
|
3134
3132
|
* import {createStore} from 'tinybase';
|
|
3133
|
+
* import {useSetTableCallback, useTable} from 'tinybase/ui-react';
|
|
3135
3134
|
*
|
|
3136
3135
|
* const store = createStore().setTable('pets', {nemo: {species: 'fish'}});
|
|
3137
3136
|
* const App = () => {
|
|
@@ -3245,10 +3244,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3245
3244
|
* updates the Store when the `span` element is clicked.
|
|
3246
3245
|
*
|
|
3247
3246
|
* ```jsx
|
|
3248
|
-
* import {useRow, useSetRowCallback} from 'tinybase/ui-react';
|
|
3249
3247
|
* import React from 'react';
|
|
3250
3248
|
* import {createRoot} from 'react-dom/client';
|
|
3251
3249
|
* import {createStore} from 'tinybase';
|
|
3250
|
+
* import {useRow, useSetRowCallback} from 'tinybase/ui-react';
|
|
3252
3251
|
*
|
|
3253
3252
|
* const store = createStore().setRow('pets', 'nemo', {species: 'fish'});
|
|
3254
3253
|
* const App = () => {
|
|
@@ -3367,10 +3366,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3367
3366
|
* updates the Store when the `span` element is clicked.
|
|
3368
3367
|
*
|
|
3369
3368
|
* ```jsx
|
|
3370
|
-
* import {useAddRowCallback, useTable} from 'tinybase/ui-react';
|
|
3371
3369
|
* import React from 'react';
|
|
3372
3370
|
* import {createRoot} from 'react-dom/client';
|
|
3373
3371
|
* import {createStore} from 'tinybase';
|
|
3372
|
+
* import {useAddRowCallback, useTable} from 'tinybase/ui-react';
|
|
3374
3373
|
*
|
|
3375
3374
|
* const store = createStore().setRow('pets', 'nemo', {species: 'fish'});
|
|
3376
3375
|
* const App = () => {
|
|
@@ -3483,10 +3482,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3483
3482
|
* handler which updates the Store when the `span` element is clicked.
|
|
3484
3483
|
*
|
|
3485
3484
|
* ```jsx
|
|
3486
|
-
* import {useRow, useSetPartialRowCallback} from 'tinybase/ui-react';
|
|
3487
3485
|
* import React from 'react';
|
|
3488
3486
|
* import {createRoot} from 'react-dom/client';
|
|
3489
3487
|
* import {createStore} from 'tinybase';
|
|
3488
|
+
* import {useRow, useSetPartialRowCallback} from 'tinybase/ui-react';
|
|
3490
3489
|
*
|
|
3491
3490
|
* const store = createStore().setRow('pets', 'nemo', {species: 'fish'});
|
|
3492
3491
|
* const App = () => {
|
|
@@ -3606,10 +3605,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3606
3605
|
* which updates the Store with a Cell value when the `span` element is clicked.
|
|
3607
3606
|
*
|
|
3608
3607
|
* ```jsx
|
|
3609
|
-
* import {useRow, useSetCellCallback} from 'tinybase/ui-react';
|
|
3610
3608
|
* import React from 'react';
|
|
3611
3609
|
* import {createRoot} from 'react-dom/client';
|
|
3612
3610
|
* import {createStore} from 'tinybase';
|
|
3611
|
+
* import {useRow, useSetCellCallback} from 'tinybase/ui-react';
|
|
3613
3612
|
*
|
|
3614
3613
|
* const store = createStore().setCell('pets', 'nemo', 'species', 'fish');
|
|
3615
3614
|
* const App = () => {
|
|
@@ -3648,10 +3647,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3648
3647
|
* clicked.
|
|
3649
3648
|
*
|
|
3650
3649
|
* ```jsx
|
|
3651
|
-
* import {useRow, useSetCellCallback} from 'tinybase/ui-react';
|
|
3652
3650
|
* import React from 'react';
|
|
3653
3651
|
* import {createRoot} from 'react-dom/client';
|
|
3654
3652
|
* import {createStore} from 'tinybase';
|
|
3653
|
+
* import {useRow, useSetCellCallback} from 'tinybase/ui-react';
|
|
3655
3654
|
*
|
|
3656
3655
|
* const store = createStore().setCell('pets', 'nemo', 'visits', 1);
|
|
3657
3656
|
* const App = () => {
|
|
@@ -3764,10 +3763,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3764
3763
|
* which updates the Store when the `span` element is clicked.
|
|
3765
3764
|
*
|
|
3766
3765
|
* ```jsx
|
|
3767
|
-
* import {useSetValuesCallback, useValues} from 'tinybase/ui-react';
|
|
3768
3766
|
* import React from 'react';
|
|
3769
3767
|
* import {createRoot} from 'react-dom/client';
|
|
3770
3768
|
* import {createStore} from 'tinybase';
|
|
3769
|
+
* import {useSetValuesCallback, useValues} from 'tinybase/ui-react';
|
|
3771
3770
|
*
|
|
3772
3771
|
* const store = createStore().setValues({open: true});
|
|
3773
3772
|
* const App = () => {
|
|
@@ -3868,10 +3867,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3868
3867
|
* handler which updates the Store when the `span` element is clicked.
|
|
3869
3868
|
*
|
|
3870
3869
|
* ```jsx
|
|
3871
|
-
* import {useSetPartialValuesCallback, useValues} from 'tinybase/ui-react';
|
|
3872
3870
|
* import React from 'react';
|
|
3873
3871
|
* import {createRoot} from 'react-dom/client';
|
|
3874
3872
|
* import {createStore} from 'tinybase';
|
|
3873
|
+
* import {useSetPartialValuesCallback, useValues} from 'tinybase/ui-react';
|
|
3875
3874
|
*
|
|
3876
3875
|
* const store = createStore().setValues({open: true});
|
|
3877
3876
|
* const App = () => {
|
|
@@ -3979,10 +3978,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
3979
3978
|
* which updates the Store when the `span` element is clicked.
|
|
3980
3979
|
*
|
|
3981
3980
|
* ```jsx
|
|
3982
|
-
* import {useSetValueCallback, useValues} from 'tinybase/ui-react';
|
|
3983
3981
|
* import React from 'react';
|
|
3984
3982
|
* import {createRoot} from 'react-dom/client';
|
|
3985
3983
|
* import {createStore} from 'tinybase';
|
|
3984
|
+
* import {useSetValueCallback, useValues} from 'tinybase/ui-react';
|
|
3986
3985
|
*
|
|
3987
3986
|
* const store = createStore().setValue('open', true);
|
|
3988
3987
|
* const App = () => {
|
|
@@ -4071,10 +4070,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4071
4070
|
* which deletes from the Store when the `span` element is clicked.
|
|
4072
4071
|
*
|
|
4073
4072
|
* ```jsx
|
|
4074
|
-
* import {useDelTablesCallback, useTables} from 'tinybase/ui-react';
|
|
4075
4073
|
* import React from 'react';
|
|
4076
4074
|
* import {createRoot} from 'react-dom/client';
|
|
4077
4075
|
* import {createStore} from 'tinybase';
|
|
4076
|
+
* import {useDelTablesCallback, useTables} from 'tinybase/ui-react';
|
|
4078
4077
|
*
|
|
4079
4078
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
4080
4079
|
* const App = () => {
|
|
@@ -4154,10 +4153,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4154
4153
|
* which deletes from the Store when the `span` element is clicked.
|
|
4155
4154
|
*
|
|
4156
4155
|
* ```jsx
|
|
4157
|
-
* import {useDelTableCallback, useTables} from 'tinybase/ui-react';
|
|
4158
4156
|
* import React from 'react';
|
|
4159
4157
|
* import {createRoot} from 'react-dom/client';
|
|
4160
4158
|
* import {createStore} from 'tinybase';
|
|
4159
|
+
* import {useDelTableCallback, useTables} from 'tinybase/ui-react';
|
|
4161
4160
|
*
|
|
4162
4161
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
4163
4162
|
* const App = () => {
|
|
@@ -4245,10 +4244,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4245
4244
|
* deletes from the Store when the `span` element is clicked.
|
|
4246
4245
|
*
|
|
4247
4246
|
* ```jsx
|
|
4248
|
-
* import {useDelRowCallback, useTables} from 'tinybase/ui-react';
|
|
4249
4247
|
* import React from 'react';
|
|
4250
4248
|
* import {createRoot} from 'react-dom/client';
|
|
4251
4249
|
* import {createStore} from 'tinybase';
|
|
4250
|
+
* import {useDelRowCallback, useTables} from 'tinybase/ui-react';
|
|
4252
4251
|
*
|
|
4253
4252
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
4254
4253
|
* const App = () => {
|
|
@@ -4341,10 +4340,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4341
4340
|
* which deletes from the Store when the `span` element is clicked.
|
|
4342
4341
|
*
|
|
4343
4342
|
* ```jsx
|
|
4344
|
-
* import {useDelCellCallback, useTables} from 'tinybase/ui-react';
|
|
4345
4343
|
* import React from 'react';
|
|
4346
4344
|
* import {createRoot} from 'react-dom/client';
|
|
4347
4345
|
* import {createStore} from 'tinybase';
|
|
4346
|
+
* import {useDelCellCallback, useTables} from 'tinybase/ui-react';
|
|
4348
4347
|
*
|
|
4349
4348
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
4350
4349
|
* const App = () => {
|
|
@@ -4432,10 +4431,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4432
4431
|
* which deletes from the Store when the `span` element is clicked.
|
|
4433
4432
|
*
|
|
4434
4433
|
* ```jsx
|
|
4435
|
-
* import {useDelValuesCallback, useValues} from 'tinybase/ui-react';
|
|
4436
4434
|
* import React from 'react';
|
|
4437
4435
|
* import {createRoot} from 'react-dom/client';
|
|
4438
4436
|
* import {createStore} from 'tinybase';
|
|
4437
|
+
* import {useDelValuesCallback, useValues} from 'tinybase/ui-react';
|
|
4439
4438
|
*
|
|
4440
4439
|
* const store = createStore().setValues({open: true});
|
|
4441
4440
|
* const App = () => {
|
|
@@ -4515,10 +4514,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4515
4514
|
* which deletes from the Store when the `span` element is clicked.
|
|
4516
4515
|
*
|
|
4517
4516
|
* ```jsx
|
|
4518
|
-
* import {useDelValueCallback, useValues} from 'tinybase/ui-react';
|
|
4519
4517
|
* import React from 'react';
|
|
4520
4518
|
* import {createRoot} from 'react-dom/client';
|
|
4521
4519
|
* import {createStore} from 'tinybase';
|
|
4520
|
+
* import {useDelValueCallback, useValues} from 'tinybase/ui-react';
|
|
4522
4521
|
*
|
|
4523
4522
|
* const store = createStore().setValues({open: true, employees: 3});
|
|
4524
4523
|
* const App = () => {
|
|
@@ -4599,10 +4598,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4599
4598
|
* is removed from the Store.
|
|
4600
4599
|
*
|
|
4601
4600
|
* ```jsx
|
|
4602
|
-
* import {Provider, useHasTablesListener} from 'tinybase/ui-react';
|
|
4603
4601
|
* import React from 'react';
|
|
4604
4602
|
* import {createRoot} from 'react-dom/client';
|
|
4605
4603
|
* import {createStore} from 'tinybase';
|
|
4604
|
+
* import {Provider, useHasTablesListener} from 'tinybase/ui-react';
|
|
4606
4605
|
*
|
|
4607
4606
|
* const App = ({store}) => (
|
|
4608
4607
|
* <Provider store={store}>
|
|
@@ -4677,10 +4676,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4677
4676
|
* is removed from the Store.
|
|
4678
4677
|
*
|
|
4679
4678
|
* ```jsx
|
|
4680
|
-
* import {Provider, useTablesListener} from 'tinybase/ui-react';
|
|
4681
4679
|
* import React from 'react';
|
|
4682
4680
|
* import {createRoot} from 'react-dom/client';
|
|
4683
4681
|
* import {createStore} from 'tinybase';
|
|
4682
|
+
* import {Provider, useTablesListener} from 'tinybase/ui-react';
|
|
4684
4683
|
*
|
|
4685
4684
|
* const App = ({store}) => (
|
|
4686
4685
|
* <Provider store={store}>
|
|
@@ -4756,10 +4755,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4756
4755
|
* is removed from the Store.
|
|
4757
4756
|
*
|
|
4758
4757
|
* ```jsx
|
|
4759
|
-
* import {Provider, useTableIdsListener} from 'tinybase/ui-react';
|
|
4760
4758
|
* import React from 'react';
|
|
4761
4759
|
* import {createRoot} from 'react-dom/client';
|
|
4762
4760
|
* import {createStore} from 'tinybase';
|
|
4761
|
+
* import {Provider, useTableIdsListener} from 'tinybase/ui-react';
|
|
4763
4762
|
*
|
|
4764
4763
|
* const App = ({store}) => (
|
|
4765
4764
|
* <Provider store={store}>
|
|
@@ -4840,10 +4839,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4840
4839
|
* is removed from the Store.
|
|
4841
4840
|
*
|
|
4842
4841
|
* ```jsx
|
|
4843
|
-
* import {Provider, useHasTableListener} from 'tinybase/ui-react';
|
|
4844
4842
|
* import React from 'react';
|
|
4845
4843
|
* import {createRoot} from 'react-dom/client';
|
|
4846
4844
|
* import {createStore} from 'tinybase';
|
|
4845
|
+
* import {Provider, useHasTableListener} from 'tinybase/ui-react';
|
|
4847
4846
|
*
|
|
4848
4847
|
* const App = ({store}) => (
|
|
4849
4848
|
* <Provider store={store}>
|
|
@@ -4928,10 +4927,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4928
4927
|
* is removed from the Store.
|
|
4929
4928
|
*
|
|
4930
4929
|
* ```jsx
|
|
4931
|
-
* import {Provider, useTableListener} from 'tinybase/ui-react';
|
|
4932
4930
|
* import React from 'react';
|
|
4933
4931
|
* import {createRoot} from 'react-dom/client';
|
|
4934
4932
|
* import {createStore} from 'tinybase';
|
|
4933
|
+
* import {Provider, useTableListener} from 'tinybase/ui-react';
|
|
4935
4934
|
*
|
|
4936
4935
|
* const App = ({store}) => (
|
|
4937
4936
|
* <Provider store={store}>
|
|
@@ -5016,10 +5015,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5016
5015
|
* listener is removed from the Store.
|
|
5017
5016
|
*
|
|
5018
5017
|
* ```jsx
|
|
5019
|
-
* import {Provider, useTableCellIdsListener} from 'tinybase/ui-react';
|
|
5020
5018
|
* import React from 'react';
|
|
5021
5019
|
* import {createRoot} from 'react-dom/client';
|
|
5022
5020
|
* import {createStore} from 'tinybase';
|
|
5021
|
+
* import {Provider, useTableCellIdsListener} from 'tinybase/ui-react';
|
|
5023
5022
|
*
|
|
5024
5023
|
* const App = ({store}) => (
|
|
5025
5024
|
* <Provider store={store}>
|
|
@@ -5107,10 +5106,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5107
5106
|
* listener is removed from the Store.
|
|
5108
5107
|
*
|
|
5109
5108
|
* ```jsx
|
|
5110
|
-
* import {Provider, useHasTableCellListener} from 'tinybase/ui-react';
|
|
5111
5109
|
* import React from 'react';
|
|
5112
5110
|
* import {createRoot} from 'react-dom/client';
|
|
5113
5111
|
* import {createStore} from 'tinybase';
|
|
5112
|
+
* import {Provider, useHasTableCellListener} from 'tinybase/ui-react';
|
|
5114
5113
|
*
|
|
5115
5114
|
* const App = ({store}) => (
|
|
5116
5115
|
* <Provider store={store}>
|
|
@@ -5202,10 +5201,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5202
5201
|
* is removed from the Store.
|
|
5203
5202
|
*
|
|
5204
5203
|
* ```jsx
|
|
5205
|
-
* import {Provider, useRowCountListener} from 'tinybase/ui-react';
|
|
5206
5204
|
* import React from 'react';
|
|
5207
5205
|
* import {createRoot} from 'react-dom/client';
|
|
5208
5206
|
* import {createStore} from 'tinybase';
|
|
5207
|
+
* import {Provider, useRowCountListener} from 'tinybase/ui-react';
|
|
5209
5208
|
*
|
|
5210
5209
|
* const App = ({store}) => (
|
|
5211
5210
|
* <Provider store={store}>
|
|
@@ -5288,10 +5287,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5288
5287
|
* is removed from the Store.
|
|
5289
5288
|
*
|
|
5290
5289
|
* ```jsx
|
|
5291
|
-
* import {Provider, useRowIdsListener} from 'tinybase/ui-react';
|
|
5292
5290
|
* import React from 'react';
|
|
5293
5291
|
* import {createRoot} from 'react-dom/client';
|
|
5294
5292
|
* import {createStore} from 'tinybase';
|
|
5293
|
+
* import {Provider, useRowIdsListener} from 'tinybase/ui-react';
|
|
5295
5294
|
*
|
|
5296
5295
|
* const App = ({store}) => (
|
|
5297
5296
|
* <Provider store={store}>
|
|
@@ -5382,10 +5381,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5382
5381
|
* listener is removed from the Store.
|
|
5383
5382
|
*
|
|
5384
5383
|
* ```jsx
|
|
5385
|
-
* import {Provider, useSortedRowIdsListener} from 'tinybase/ui-react';
|
|
5386
5384
|
* import React from 'react';
|
|
5387
5385
|
* import {createRoot} from 'react-dom/client';
|
|
5388
5386
|
* import {createStore} from 'tinybase';
|
|
5387
|
+
* import {Provider, useSortedRowIdsListener} from 'tinybase/ui-react';
|
|
5389
5388
|
*
|
|
5390
5389
|
* const App = ({store}) => (
|
|
5391
5390
|
* <Provider store={store}>
|
|
@@ -5498,10 +5497,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5498
5497
|
* is removed from the Store.
|
|
5499
5498
|
*
|
|
5500
5499
|
* ```jsx
|
|
5501
|
-
* import {Provider, useHasRowListener} from 'tinybase/ui-react';
|
|
5502
5500
|
* import React from 'react';
|
|
5503
5501
|
* import {createRoot} from 'react-dom/client';
|
|
5504
5502
|
* import {createStore} from 'tinybase';
|
|
5503
|
+
* import {Provider, useHasRowListener} from 'tinybase/ui-react';
|
|
5505
5504
|
*
|
|
5506
5505
|
* const App = ({store}) => (
|
|
5507
5506
|
* <Provider store={store}>
|
|
@@ -5596,10 +5595,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5596
5595
|
* is removed from the Store.
|
|
5597
5596
|
*
|
|
5598
5597
|
* ```jsx
|
|
5599
|
-
* import {Provider, useRowListener} from 'tinybase/ui-react';
|
|
5600
5598
|
* import React from 'react';
|
|
5601
5599
|
* import {createRoot} from 'react-dom/client';
|
|
5602
5600
|
* import {createStore} from 'tinybase';
|
|
5601
|
+
* import {Provider, useRowListener} from 'tinybase/ui-react';
|
|
5603
5602
|
*
|
|
5604
5603
|
* const App = ({store}) => (
|
|
5605
5604
|
* <Provider store={store}>
|
|
@@ -5693,10 +5692,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5693
5692
|
* is removed from the Store.
|
|
5694
5693
|
*
|
|
5695
5694
|
* ```jsx
|
|
5696
|
-
* import {Provider, useCellIdsListener} from 'tinybase/ui-react';
|
|
5697
5695
|
* import React from 'react';
|
|
5698
5696
|
* import {createRoot} from 'react-dom/client';
|
|
5699
5697
|
* import {createStore} from 'tinybase';
|
|
5698
|
+
* import {Provider, useCellIdsListener} from 'tinybase/ui-react';
|
|
5700
5699
|
*
|
|
5701
5700
|
* const App = ({store}) => (
|
|
5702
5701
|
* <Provider store={store}>
|
|
@@ -5794,10 +5793,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5794
5793
|
* is removed from the Store.
|
|
5795
5794
|
*
|
|
5796
5795
|
* ```jsx
|
|
5797
|
-
* import {Provider, useHasCellListener} from 'tinybase/ui-react';
|
|
5798
5796
|
* import React from 'react';
|
|
5799
5797
|
* import {createRoot} from 'react-dom/client';
|
|
5800
5798
|
* import {createStore} from 'tinybase';
|
|
5799
|
+
* import {Provider, useHasCellListener} from 'tinybase/ui-react';
|
|
5801
5800
|
*
|
|
5802
5801
|
* const App = ({store}) => (
|
|
5803
5802
|
* <Provider store={store}>
|
|
@@ -5905,10 +5904,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5905
5904
|
* is removed from the Store.
|
|
5906
5905
|
*
|
|
5907
5906
|
* ```jsx
|
|
5908
|
-
* import {Provider, useCellListener} from 'tinybase/ui-react';
|
|
5909
5907
|
* import React from 'react';
|
|
5910
5908
|
* import {createRoot} from 'react-dom/client';
|
|
5911
5909
|
* import {createStore} from 'tinybase';
|
|
5910
|
+
* import {Provider, useCellListener} from 'tinybase/ui-react';
|
|
5912
5911
|
*
|
|
5913
5912
|
* const App = ({store}) => (
|
|
5914
5913
|
* <Provider store={store}>
|
|
@@ -5998,10 +5997,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5998
5997
|
* is removed from the Store.
|
|
5999
5998
|
*
|
|
6000
5999
|
* ```jsx
|
|
6001
|
-
* import {Provider, useHasValuesListener} from 'tinybase/ui-react';
|
|
6002
6000
|
* import React from 'react';
|
|
6003
6001
|
* import {createRoot} from 'react-dom/client';
|
|
6004
6002
|
* import {createStore} from 'tinybase';
|
|
6003
|
+
* import {Provider, useHasValuesListener} from 'tinybase/ui-react';
|
|
6005
6004
|
*
|
|
6006
6005
|
* const App = ({store}) => (
|
|
6007
6006
|
* <Provider store={store}>
|
|
@@ -6076,10 +6075,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6076
6075
|
* is removed from the Store.
|
|
6077
6076
|
*
|
|
6078
6077
|
* ```jsx
|
|
6079
|
-
* import {Provider, useValuesListener} from 'tinybase/ui-react';
|
|
6080
6078
|
* import React from 'react';
|
|
6081
6079
|
* import {createRoot} from 'react-dom/client';
|
|
6082
6080
|
* import {createStore} from 'tinybase';
|
|
6081
|
+
* import {Provider, useValuesListener} from 'tinybase/ui-react';
|
|
6083
6082
|
*
|
|
6084
6083
|
* const App = ({store}) => (
|
|
6085
6084
|
* <Provider store={store}>
|
|
@@ -6155,10 +6154,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6155
6154
|
* is removed from the Store.
|
|
6156
6155
|
*
|
|
6157
6156
|
* ```jsx
|
|
6158
|
-
* import {Provider, useValueIdsListener} from 'tinybase/ui-react';
|
|
6159
6157
|
* import React from 'react';
|
|
6160
6158
|
* import {createRoot} from 'react-dom/client';
|
|
6161
6159
|
* import {createStore} from 'tinybase';
|
|
6160
|
+
* import {Provider, useValueIdsListener} from 'tinybase/ui-react';
|
|
6162
6161
|
*
|
|
6163
6162
|
* const App = ({store}) => (
|
|
6164
6163
|
* <Provider store={store}>
|
|
@@ -6240,10 +6239,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6240
6239
|
* is removed from the Store.
|
|
6241
6240
|
*
|
|
6242
6241
|
* ```jsx
|
|
6243
|
-
* import {Provider, useHasValueListener} from 'tinybase/ui-react';
|
|
6244
6242
|
* import React from 'react';
|
|
6245
6243
|
* import {createRoot} from 'react-dom/client';
|
|
6246
6244
|
* import {createStore} from 'tinybase';
|
|
6245
|
+
* import {Provider, useHasValueListener} from 'tinybase/ui-react';
|
|
6247
6246
|
*
|
|
6248
6247
|
* const App = ({store}) => (
|
|
6249
6248
|
* <Provider store={store}>
|
|
@@ -6328,10 +6327,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6328
6327
|
* is removed from the Store.
|
|
6329
6328
|
*
|
|
6330
6329
|
* ```jsx
|
|
6331
|
-
* import {Provider, useValueListener} from 'tinybase/ui-react';
|
|
6332
6330
|
* import React from 'react';
|
|
6333
6331
|
* import {createRoot} from 'react-dom/client';
|
|
6334
6332
|
* import {createStore} from 'tinybase';
|
|
6333
|
+
* import {Provider, useValueListener} from 'tinybase/ui-react';
|
|
6335
6334
|
*
|
|
6336
6335
|
* const App = ({store}) => (
|
|
6337
6336
|
* <Provider store={store}>
|
|
@@ -6403,10 +6402,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6403
6402
|
* listener is removed from the Store.
|
|
6404
6403
|
*
|
|
6405
6404
|
* ```jsx
|
|
6406
|
-
* import {Provider, useStartTransactionListener} from 'tinybase/ui-react';
|
|
6407
6405
|
* import React from 'react';
|
|
6408
6406
|
* import {createRoot} from 'react-dom/client';
|
|
6409
6407
|
* import {createStore} from 'tinybase';
|
|
6408
|
+
* import {Provider, useStartTransactionListener} from 'tinybase/ui-react';
|
|
6410
6409
|
*
|
|
6411
6410
|
* const App = ({store}) => (
|
|
6412
6411
|
* <Provider store={store}>
|
|
@@ -6475,13 +6474,13 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6475
6474
|
* unmounted, the listener is removed from the Store.
|
|
6476
6475
|
*
|
|
6477
6476
|
* ```jsx
|
|
6477
|
+
* import React from 'react';
|
|
6478
|
+
* import {createRoot} from 'react-dom/client';
|
|
6479
|
+
* import {createStore} from 'tinybase';
|
|
6478
6480
|
* import {
|
|
6479
6481
|
* Provider,
|
|
6480
6482
|
* useWillFinishTransactionListener,
|
|
6481
6483
|
* } from 'tinybase/ui-react';
|
|
6482
|
-
* import React from 'react';
|
|
6483
|
-
* import {createRoot} from 'react-dom/client';
|
|
6484
|
-
* import {createStore} from 'tinybase';
|
|
6485
6484
|
*
|
|
6486
6485
|
* const App = ({store}) => (
|
|
6487
6486
|
* <Provider store={store}>
|
|
@@ -6552,13 +6551,13 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6552
6551
|
* unmounted, the listener is removed from the Store.
|
|
6553
6552
|
*
|
|
6554
6553
|
* ```jsx
|
|
6554
|
+
* import React from 'react';
|
|
6555
|
+
* import {createRoot} from 'react-dom/client';
|
|
6556
|
+
* import {createStore} from 'tinybase';
|
|
6555
6557
|
* import {
|
|
6556
6558
|
* Provider,
|
|
6557
6559
|
* useDidFinishTransactionListener,
|
|
6558
6560
|
* } from 'tinybase/ui-react';
|
|
6559
|
-
* import React from 'react';
|
|
6560
|
-
* import {createRoot} from 'react-dom/client';
|
|
6561
|
-
* import {createStore} from 'tinybase';
|
|
6562
6561
|
*
|
|
6563
6562
|
* const App = ({store}) => (
|
|
6564
6563
|
* <Provider store={store}>
|
|
@@ -6639,10 +6638,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6639
6638
|
* object creation only occurs once by default.
|
|
6640
6639
|
*
|
|
6641
6640
|
* ```jsx
|
|
6642
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6643
|
-
* import {useCreateMetrics, useCreateStore} from 'tinybase/ui-react';
|
|
6644
6641
|
* import React from 'react';
|
|
6645
6642
|
* import {createRoot} from 'react-dom/client';
|
|
6643
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6644
|
+
* import {useCreateMetrics, useCreateStore} from 'tinybase/ui-react';
|
|
6646
6645
|
*
|
|
6647
6646
|
* const App = () => {
|
|
6648
6647
|
* const store = useCreateStore(() =>
|
|
@@ -6676,10 +6675,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6676
6675
|
* dependency, and so the Metrics object is created again on the second render.
|
|
6677
6676
|
*
|
|
6678
6677
|
* ```jsx
|
|
6679
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6680
|
-
* import {useCreateMetrics, useCreateStore} from 'tinybase/ui-react';
|
|
6681
6678
|
* import React from 'react';
|
|
6682
6679
|
* import {createRoot} from 'react-dom/client';
|
|
6680
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6681
|
+
* import {useCreateMetrics, useCreateStore} from 'tinybase/ui-react';
|
|
6683
6682
|
*
|
|
6684
6683
|
* const App = ({tableToCount}) => {
|
|
6685
6684
|
* const store = useCreateStore(() =>
|
|
@@ -6733,15 +6732,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6733
6732
|
* inner component accesses their Ids.
|
|
6734
6733
|
*
|
|
6735
6734
|
* ```jsx
|
|
6735
|
+
* import React from 'react';
|
|
6736
|
+
* import {createRoot} from 'react-dom/client';
|
|
6737
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6736
6738
|
* import {
|
|
6737
6739
|
* Provider,
|
|
6738
6740
|
* useCreateMetrics,
|
|
6739
6741
|
* useCreateStore,
|
|
6740
6742
|
* useMetricsIds,
|
|
6741
6743
|
* } from 'tinybase/ui-react';
|
|
6742
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6743
|
-
* import React from 'react';
|
|
6744
|
-
* import {createRoot} from 'react-dom/client';
|
|
6745
6744
|
*
|
|
6746
6745
|
* const App = () => {
|
|
6747
6746
|
* const store1 = useCreateStore(createStore);
|
|
@@ -6795,10 +6794,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6795
6794
|
* as a prop.
|
|
6796
6795
|
*
|
|
6797
6796
|
* ```jsx
|
|
6798
|
-
* import {Provider, useMetrics} from 'tinybase/ui-react';
|
|
6799
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6800
6797
|
* import React from 'react';
|
|
6801
6798
|
* import {createRoot} from 'react-dom/client';
|
|
6799
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6800
|
+
* import {Provider, useMetrics} from 'tinybase/ui-react';
|
|
6802
6801
|
*
|
|
6803
6802
|
* const App = ({metrics}) => (
|
|
6804
6803
|
* <Provider metrics={metrics}>
|
|
@@ -6820,10 +6819,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6820
6819
|
* to have it passed as a prop.
|
|
6821
6820
|
*
|
|
6822
6821
|
* ```jsx
|
|
6823
|
-
* import {Provider, useMetrics} from 'tinybase/ui-react';
|
|
6824
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6825
6822
|
* import React from 'react';
|
|
6826
6823
|
* import {createRoot} from 'react-dom/client';
|
|
6824
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6825
|
+
* import {Provider, useMetrics} from 'tinybase/ui-react';
|
|
6827
6826
|
*
|
|
6828
6827
|
* const App = ({metrics}) => (
|
|
6829
6828
|
* <Provider metricsById={{petStore: metrics}}>
|
|
@@ -6878,10 +6877,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6878
6877
|
* into it, making it more portable.
|
|
6879
6878
|
*
|
|
6880
6879
|
* ```jsx
|
|
6881
|
-
* import {Provider, useMetricsOrMetricsById} from 'tinybase/ui-react';
|
|
6882
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6883
6880
|
* import React from 'react';
|
|
6884
6881
|
* import {createRoot} from 'react-dom/client';
|
|
6882
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6883
|
+
* import {Provider, useMetricsOrMetricsById} from 'tinybase/ui-react';
|
|
6885
6884
|
*
|
|
6886
6885
|
* const App = ({metrics}) => (
|
|
6887
6886
|
* <Provider metrics={metrics}>
|
|
@@ -6950,9 +6949,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
6950
6949
|
* the component.
|
|
6951
6950
|
*
|
|
6952
6951
|
* ```jsx
|
|
6953
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
6954
6952
|
* import React from 'react';
|
|
6955
6953
|
* import {createRoot} from 'react-dom/client';
|
|
6954
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
6956
6955
|
* import {useMetricIds} from 'tinybase/ui-react';
|
|
6957
6956
|
*
|
|
6958
6957
|
* const store = createStore().setTable('pets', {
|
|
@@ -7013,9 +7012,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7013
7012
|
* component.
|
|
7014
7013
|
*
|
|
7015
7014
|
* ```jsx
|
|
7016
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
7017
7015
|
* import React from 'react';
|
|
7018
7016
|
* import {createRoot} from 'react-dom/client';
|
|
7017
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
7019
7018
|
* import {useMetric} from 'tinybase/ui-react';
|
|
7020
7019
|
*
|
|
7021
7020
|
* const store = createStore().setTable('species', {
|
|
@@ -7041,10 +7040,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7041
7040
|
* is provided. A component within it then uses the useMetric hook.
|
|
7042
7041
|
*
|
|
7043
7042
|
* ```jsx
|
|
7044
|
-
* import {Provider, useMetric} from 'tinybase/ui-react';
|
|
7045
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
7046
7043
|
* import React from 'react';
|
|
7047
7044
|
* import {createRoot} from 'react-dom/client';
|
|
7045
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
7046
|
+
* import {Provider, useMetric} from 'tinybase/ui-react';
|
|
7048
7047
|
*
|
|
7049
7048
|
* const App = ({metrics}) => (
|
|
7050
7049
|
* <Provider metrics={metrics}>
|
|
@@ -7071,10 +7070,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7071
7070
|
* is provided. A component within it then uses the useMetric hook.
|
|
7072
7071
|
*
|
|
7073
7072
|
* ```jsx
|
|
7074
|
-
* import {Provider, useMetric} from 'tinybase/ui-react';
|
|
7075
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
7076
7073
|
* import React from 'react';
|
|
7077
7074
|
* import {createRoot} from 'react-dom/client';
|
|
7075
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
7076
|
+
* import {Provider, useMetric} from 'tinybase/ui-react';
|
|
7078
7077
|
*
|
|
7079
7078
|
* const App = ({metrics}) => (
|
|
7080
7079
|
* <Provider metricsById={{petMetrics: metrics}}>
|
|
@@ -7146,10 +7145,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7146
7145
|
* is removed from the Metrics object.
|
|
7147
7146
|
*
|
|
7148
7147
|
* ```jsx
|
|
7149
|
-
* import {Provider, useMetricListener} from 'tinybase/ui-react';
|
|
7150
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
7151
7148
|
* import React from 'react';
|
|
7152
7149
|
* import {createRoot} from 'react-dom/client';
|
|
7150
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
7151
|
+
* import {Provider, useMetricListener} from 'tinybase/ui-react';
|
|
7153
7152
|
*
|
|
7154
7153
|
* const App = ({metrics}) => (
|
|
7155
7154
|
* <Provider metrics={metrics}>
|
|
@@ -7236,10 +7235,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7236
7235
|
* object creation only occurs once by default.
|
|
7237
7236
|
*
|
|
7238
7237
|
* ```jsx
|
|
7239
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7240
|
-
* import {useCreateIndexes, useCreateStore} from 'tinybase/ui-react';
|
|
7241
7238
|
* import React from 'react';
|
|
7242
7239
|
* import {createRoot} from 'react-dom/client';
|
|
7240
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7241
|
+
* import {useCreateIndexes, useCreateStore} from 'tinybase/ui-react';
|
|
7243
7242
|
*
|
|
7244
7243
|
* const App = () => {
|
|
7245
7244
|
* const store = useCreateStore(() =>
|
|
@@ -7278,10 +7277,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7278
7277
|
* dependency, and so the Indexes object is created again on the second render.
|
|
7279
7278
|
*
|
|
7280
7279
|
* ```jsx
|
|
7281
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7282
|
-
* import {useCreateIndexes, useCreateStore} from 'tinybase/ui-react';
|
|
7283
7280
|
* import React from 'react';
|
|
7284
7281
|
* import {createRoot} from 'react-dom/client';
|
|
7282
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7283
|
+
* import {useCreateIndexes, useCreateStore} from 'tinybase/ui-react';
|
|
7285
7284
|
*
|
|
7286
7285
|
* const App = ({cellToIndex}) => {
|
|
7287
7286
|
* const store = useCreateStore(() =>
|
|
@@ -7338,15 +7337,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7338
7337
|
* inner component accesses their Ids.
|
|
7339
7338
|
*
|
|
7340
7339
|
* ```jsx
|
|
7340
|
+
* import React from 'react';
|
|
7341
|
+
* import {createRoot} from 'react-dom/client';
|
|
7342
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7341
7343
|
* import {
|
|
7342
7344
|
* Provider,
|
|
7343
7345
|
* useCreateIndexes,
|
|
7344
7346
|
* useCreateStore,
|
|
7345
7347
|
* useIndexesIds,
|
|
7346
7348
|
* } from 'tinybase/ui-react';
|
|
7347
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7348
|
-
* import React from 'react';
|
|
7349
|
-
* import {createRoot} from 'react-dom/client';
|
|
7350
7349
|
*
|
|
7351
7350
|
* const App = () => {
|
|
7352
7351
|
* const store1 = useCreateStore(createStore);
|
|
@@ -7400,10 +7399,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7400
7399
|
* as a prop.
|
|
7401
7400
|
*
|
|
7402
7401
|
* ```jsx
|
|
7403
|
-
* import {Provider, useIndexes} from 'tinybase/ui-react';
|
|
7404
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7405
7402
|
* import React from 'react';
|
|
7406
7403
|
* import {createRoot} from 'react-dom/client';
|
|
7404
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7405
|
+
* import {Provider, useIndexes} from 'tinybase/ui-react';
|
|
7407
7406
|
*
|
|
7408
7407
|
* const App = ({indexes}) => (
|
|
7409
7408
|
* <Provider indexes={indexes}>
|
|
@@ -7425,10 +7424,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7425
7424
|
* to have it passed as a prop.
|
|
7426
7425
|
*
|
|
7427
7426
|
* ```jsx
|
|
7428
|
-
* import {Provider, useIndexes} from 'tinybase/ui-react';
|
|
7429
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7430
7427
|
* import React from 'react';
|
|
7431
7428
|
* import {createRoot} from 'react-dom/client';
|
|
7429
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7430
|
+
* import {Provider, useIndexes} from 'tinybase/ui-react';
|
|
7432
7431
|
*
|
|
7433
7432
|
* const App = ({indexes}) => (
|
|
7434
7433
|
* <Provider indexesById={{petStore: indexes}}>
|
|
@@ -7483,10 +7482,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7483
7482
|
* into it, making it more portable.
|
|
7484
7483
|
*
|
|
7485
7484
|
* ```jsx
|
|
7486
|
-
* import {Provider, useIndexesOrIndexesById} from 'tinybase/ui-react';
|
|
7487
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7488
7485
|
* import React from 'react';
|
|
7489
7486
|
* import {createRoot} from 'react-dom/client';
|
|
7487
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7488
|
+
* import {Provider, useIndexesOrIndexesById} from 'tinybase/ui-react';
|
|
7490
7489
|
*
|
|
7491
7490
|
* const App = ({indexes}) => (
|
|
7492
7491
|
* <Provider indexes={indexes}>
|
|
@@ -7555,9 +7554,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7555
7554
|
* component.
|
|
7556
7555
|
*
|
|
7557
7556
|
* ```jsx
|
|
7558
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7559
7557
|
* import React from 'react';
|
|
7560
7558
|
* import {createRoot} from 'react-dom/client';
|
|
7559
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7561
7560
|
* import {useIndexIds} from 'tinybase/ui-react';
|
|
7562
7561
|
*
|
|
7563
7562
|
* const store = createStore().setTable('pets', {
|
|
@@ -7616,9 +7615,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7616
7615
|
* the component.
|
|
7617
7616
|
*
|
|
7618
7617
|
* ```jsx
|
|
7619
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7620
7618
|
* import React from 'react';
|
|
7621
7619
|
* import {createRoot} from 'react-dom/client';
|
|
7620
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7622
7621
|
* import {useSliceIds} from 'tinybase/ui-react';
|
|
7623
7622
|
*
|
|
7624
7623
|
* const store = createStore().setTable('pets', {
|
|
@@ -7646,10 +7645,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7646
7645
|
* is provided. A component within it then uses the useSliceIds hook.
|
|
7647
7646
|
*
|
|
7648
7647
|
* ```jsx
|
|
7649
|
-
* import {Provider, useSliceIds} from 'tinybase/ui-react';
|
|
7650
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7651
7648
|
* import React from 'react';
|
|
7652
7649
|
* import {createRoot} from 'react-dom/client';
|
|
7650
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7651
|
+
* import {Provider, useSliceIds} from 'tinybase/ui-react';
|
|
7653
7652
|
*
|
|
7654
7653
|
* const App = ({indexes}) => (
|
|
7655
7654
|
* <Provider indexes={indexes}>
|
|
@@ -7676,10 +7675,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7676
7675
|
* is provided. A component within it then uses the useSliceIds hook.
|
|
7677
7676
|
*
|
|
7678
7677
|
* ```jsx
|
|
7679
|
-
* import {Provider, useSliceIds} from 'tinybase/ui-react';
|
|
7680
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7681
7678
|
* import React from 'react';
|
|
7682
7679
|
* import {createRoot} from 'react-dom/client';
|
|
7680
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7681
|
+
* import {Provider, useSliceIds} from 'tinybase/ui-react';
|
|
7683
7682
|
*
|
|
7684
7683
|
* const App = ({indexes}) => (
|
|
7685
7684
|
* <Provider indexesById={{petIndexes: indexes}}>
|
|
@@ -7748,9 +7747,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7748
7747
|
* re-renders the component.
|
|
7749
7748
|
*
|
|
7750
7749
|
* ```jsx
|
|
7751
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7752
7750
|
* import React from 'react';
|
|
7753
7751
|
* import {createRoot} from 'react-dom/client';
|
|
7752
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7754
7753
|
* import {useSliceRowIds} from 'tinybase/ui-react';
|
|
7755
7754
|
*
|
|
7756
7755
|
* const store = createStore().setTable('pets', {
|
|
@@ -7780,10 +7779,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7780
7779
|
* is provided. A component within it then uses the useSliceRowIds hook.
|
|
7781
7780
|
*
|
|
7782
7781
|
* ```jsx
|
|
7783
|
-
* import {Provider, useSliceRowIds} from 'tinybase/ui-react';
|
|
7784
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7785
7782
|
* import React from 'react';
|
|
7786
7783
|
* import {createRoot} from 'react-dom/client';
|
|
7784
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7785
|
+
* import {Provider, useSliceRowIds} from 'tinybase/ui-react';
|
|
7787
7786
|
*
|
|
7788
7787
|
* const App = ({indexes}) => (
|
|
7789
7788
|
* <Provider indexes={indexes}>
|
|
@@ -7812,10 +7811,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7812
7811
|
* is provided. A component within it then uses the useSliceRowIds hook.
|
|
7813
7812
|
*
|
|
7814
7813
|
* ```jsx
|
|
7815
|
-
* import {Provider, useSliceRowIds} from 'tinybase/ui-react';
|
|
7816
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7817
7814
|
* import React from 'react';
|
|
7818
7815
|
* import {createRoot} from 'react-dom/client';
|
|
7816
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7817
|
+
* import {Provider, useSliceRowIds} from 'tinybase/ui-react';
|
|
7819
7818
|
*
|
|
7820
7819
|
* const App = ({indexes}) => (
|
|
7821
7820
|
* <Provider indexesById={{petIndexes: indexes}}>
|
|
@@ -7893,10 +7892,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7893
7892
|
* is removed from the Indexes object.
|
|
7894
7893
|
*
|
|
7895
7894
|
* ```jsx
|
|
7896
|
-
* import {Provider, useSliceIdsListener} from 'tinybase/ui-react';
|
|
7897
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7898
7895
|
* import React from 'react';
|
|
7899
7896
|
* import {createRoot} from 'react-dom/client';
|
|
7897
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7898
|
+
* import {Provider, useSliceIdsListener} from 'tinybase/ui-react';
|
|
7900
7899
|
*
|
|
7901
7900
|
* const App = ({indexes}) => (
|
|
7902
7901
|
* <Provider indexes={indexes}>
|
|
@@ -7989,10 +7988,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
7989
7988
|
* listener is removed from the Indexes object.
|
|
7990
7989
|
*
|
|
7991
7990
|
* ```jsx
|
|
7992
|
-
* import {Provider, useSliceRowIdsListener} from 'tinybase/ui-react';
|
|
7993
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
7994
7991
|
* import React from 'react';
|
|
7995
7992
|
* import {createRoot} from 'react-dom/client';
|
|
7993
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
7994
|
+
* import {Provider, useSliceRowIdsListener} from 'tinybase/ui-react';
|
|
7996
7995
|
*
|
|
7997
7996
|
* const App = ({indexes}) => (
|
|
7998
7997
|
* <Provider indexes={indexes}>
|
|
@@ -8081,10 +8080,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8081
8080
|
* Relationships object creation only occurs once by default.
|
|
8082
8081
|
*
|
|
8083
8082
|
* ```jsx
|
|
8084
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8085
|
-
* import {useCreateRelationships, useCreateStore} from 'tinybase/ui-react';
|
|
8086
8083
|
* import React from 'react';
|
|
8087
8084
|
* import {createRoot} from 'react-dom/client';
|
|
8085
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8086
|
+
* import {useCreateRelationships, useCreateStore} from 'tinybase/ui-react';
|
|
8088
8087
|
*
|
|
8089
8088
|
* const App = () => {
|
|
8090
8089
|
* const store = useCreateStore(() =>
|
|
@@ -8129,10 +8128,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8129
8128
|
* object is created again on the second render.
|
|
8130
8129
|
*
|
|
8131
8130
|
* ```jsx
|
|
8132
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8133
|
-
* import {useCreateRelationships, useCreateStore} from 'tinybase/ui-react';
|
|
8134
8131
|
* import React from 'react';
|
|
8135
8132
|
* import {createRoot} from 'react-dom/client';
|
|
8133
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8134
|
+
* import {useCreateRelationships, useCreateStore} from 'tinybase/ui-react';
|
|
8136
8135
|
*
|
|
8137
8136
|
* const App = ({remoteTableAndCellToLink}) => {
|
|
8138
8137
|
* const store = useCreateStore(() =>
|
|
@@ -8195,15 +8194,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8195
8194
|
* an inner component accesses their Ids.
|
|
8196
8195
|
*
|
|
8197
8196
|
* ```jsx
|
|
8197
|
+
* import React from 'react';
|
|
8198
|
+
* import {createRoot} from 'react-dom/client';
|
|
8199
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8198
8200
|
* import {
|
|
8199
8201
|
* Provider,
|
|
8200
8202
|
* useCreateRelationships,
|
|
8201
8203
|
* useCreateStore,
|
|
8202
8204
|
* useRelationshipsIds,
|
|
8203
8205
|
* } from 'tinybase/ui-react';
|
|
8204
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8205
|
-
* import React from 'react';
|
|
8206
|
-
* import {createRoot} from 'react-dom/client';
|
|
8207
8206
|
*
|
|
8208
8207
|
* const App = () => {
|
|
8209
8208
|
* const store1 = useCreateStore(createStore);
|
|
@@ -8265,10 +8264,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8265
8264
|
* have it passed as a prop.
|
|
8266
8265
|
*
|
|
8267
8266
|
* ```jsx
|
|
8268
|
-
* import {Provider, useRelationships} from 'tinybase/ui-react';
|
|
8269
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8270
8267
|
* import React from 'react';
|
|
8271
8268
|
* import {createRoot} from 'react-dom/client';
|
|
8269
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8270
|
+
* import {Provider, useRelationships} from 'tinybase/ui-react';
|
|
8272
8271
|
*
|
|
8273
8272
|
* const App = ({relationships}) => (
|
|
8274
8273
|
* <Provider relationships={relationships}>
|
|
@@ -8293,10 +8292,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8293
8292
|
* without the need to have it passed as a prop.
|
|
8294
8293
|
*
|
|
8295
8294
|
* ```jsx
|
|
8296
|
-
* import {Provider, useRelationships} from 'tinybase/ui-react';
|
|
8297
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8298
8295
|
* import React from 'react';
|
|
8299
8296
|
* import {createRoot} from 'react-dom/client';
|
|
8297
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8298
|
+
* import {Provider, useRelationships} from 'tinybase/ui-react';
|
|
8300
8299
|
*
|
|
8301
8300
|
* const App = ({relationships}) => (
|
|
8302
8301
|
* <Provider relationshipsById={{petStore: relationships}}>
|
|
@@ -8357,13 +8356,13 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8357
8356
|
* it, making it more portable.
|
|
8358
8357
|
*
|
|
8359
8358
|
* ```jsx
|
|
8359
|
+
* import React from 'react';
|
|
8360
|
+
* import {createRoot} from 'react-dom/client';
|
|
8361
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8360
8362
|
* import {
|
|
8361
8363
|
* Provider,
|
|
8362
8364
|
* useRelationshipsOrRelationshipsById,
|
|
8363
8365
|
* } from 'tinybase/ui-react';
|
|
8364
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8365
|
-
* import React from 'react';
|
|
8366
|
-
* import {createRoot} from 'react-dom/client';
|
|
8367
8366
|
*
|
|
8368
8367
|
* const App = ({relationships}) => (
|
|
8369
8368
|
* <Provider relationships={relationships}>
|
|
@@ -8440,9 +8439,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8440
8439
|
* Relationship re-renders the component.
|
|
8441
8440
|
*
|
|
8442
8441
|
* ```jsx
|
|
8443
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8444
8442
|
* import React from 'react';
|
|
8445
8443
|
* import {createRoot} from 'react-dom/client';
|
|
8444
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8446
8445
|
* import {useRelationshipIds} from 'tinybase/ui-react';
|
|
8447
8446
|
*
|
|
8448
8447
|
* const store = createStore().setTable('pets', {
|
|
@@ -8516,9 +8515,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8516
8515
|
* re-renders the component.
|
|
8517
8516
|
*
|
|
8518
8517
|
* ```jsx
|
|
8519
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8520
8518
|
* import React from 'react';
|
|
8521
8519
|
* import {createRoot} from 'react-dom/client';
|
|
8520
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8522
8521
|
* import {useRemoteRowId} from 'tinybase/ui-react';
|
|
8523
8522
|
*
|
|
8524
8523
|
* const store = createStore()
|
|
@@ -8548,10 +8547,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8548
8547
|
* object is provided. A component within it then uses the useRemoteRowId hook.
|
|
8549
8548
|
*
|
|
8550
8549
|
* ```jsx
|
|
8551
|
-
* import {Provider, useRemoteRowId} from 'tinybase/ui-react';
|
|
8552
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8553
8550
|
* import React from 'react';
|
|
8554
8551
|
* import {createRoot} from 'react-dom/client';
|
|
8552
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8553
|
+
* import {Provider, useRemoteRowId} from 'tinybase/ui-react';
|
|
8555
8554
|
*
|
|
8556
8555
|
* const App = ({relationships}) => (
|
|
8557
8556
|
* <Provider relationships={relationships}>
|
|
@@ -8577,10 +8576,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8577
8576
|
* object is provided. A component within it then uses the useRemoteRowId hook.
|
|
8578
8577
|
*
|
|
8579
8578
|
* ```jsx
|
|
8580
|
-
* import {Provider, useRemoteRowId} from 'tinybase/ui-react';
|
|
8581
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8582
8579
|
* import React from 'react';
|
|
8583
8580
|
* import {createRoot} from 'react-dom/client';
|
|
8581
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8582
|
+
* import {Provider, useRemoteRowId} from 'tinybase/ui-react';
|
|
8584
8583
|
*
|
|
8585
8584
|
* const App = ({relationships}) => (
|
|
8586
8585
|
* <Provider relationshipsById={{petRelationships: relationships}}>
|
|
@@ -8650,9 +8649,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8650
8649
|
* re-renders the component.
|
|
8651
8650
|
*
|
|
8652
8651
|
* ```jsx
|
|
8653
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8654
8652
|
* import React from 'react';
|
|
8655
8653
|
* import {createRoot} from 'react-dom/client';
|
|
8654
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8656
8655
|
* import {useLocalRowIds} from 'tinybase/ui-react';
|
|
8657
8656
|
*
|
|
8658
8657
|
* const store = createStore()
|
|
@@ -8684,10 +8683,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8684
8683
|
* object is provided. A component within it then uses the useLocalRowIds hook.
|
|
8685
8684
|
*
|
|
8686
8685
|
* ```jsx
|
|
8687
|
-
* import {Provider, useLocalRowIds} from 'tinybase/ui-react';
|
|
8688
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8689
8686
|
* import React from 'react';
|
|
8690
8687
|
* import {createRoot} from 'react-dom/client';
|
|
8688
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8689
|
+
* import {Provider, useLocalRowIds} from 'tinybase/ui-react';
|
|
8691
8690
|
*
|
|
8692
8691
|
* const App = ({relationships}) => (
|
|
8693
8692
|
* <Provider relationships={relationships}>
|
|
@@ -8715,10 +8714,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8715
8714
|
* object is provided. A component within it then uses the useLocalRowIds hook.
|
|
8716
8715
|
*
|
|
8717
8716
|
* ```jsx
|
|
8718
|
-
* import {Provider, useLocalRowIds} from 'tinybase/ui-react';
|
|
8719
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8720
8717
|
* import React from 'react';
|
|
8721
8718
|
* import {createRoot} from 'react-dom/client';
|
|
8719
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8720
|
+
* import {Provider, useLocalRowIds} from 'tinybase/ui-react';
|
|
8722
8721
|
*
|
|
8723
8722
|
* const App = ({relationships}) => (
|
|
8724
8723
|
* <Provider relationshipsById={{petRelationships: relationships}}>
|
|
@@ -8792,9 +8791,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8792
8791
|
* re-renders the component.
|
|
8793
8792
|
*
|
|
8794
8793
|
* ```jsx
|
|
8795
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8796
8794
|
* import React from 'react';
|
|
8797
8795
|
* import {createRoot} from 'react-dom/client';
|
|
8796
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8798
8797
|
* import {useLinkedRowIds} from 'tinybase/ui-react';
|
|
8799
8798
|
*
|
|
8800
8799
|
* const store = createStore().setTable('pets', {
|
|
@@ -8829,10 +8828,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8829
8828
|
* object is provided. A component within it then uses the useLinkedRowIds hook.
|
|
8830
8829
|
*
|
|
8831
8830
|
* ```jsx
|
|
8832
|
-
* import {Provider, useLinkedRowIds} from 'tinybase/ui-react';
|
|
8833
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8834
8831
|
* import React from 'react';
|
|
8835
8832
|
* import {createRoot} from 'react-dom/client';
|
|
8833
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8834
|
+
* import {Provider, useLinkedRowIds} from 'tinybase/ui-react';
|
|
8836
8835
|
*
|
|
8837
8836
|
* const App = ({relationships}) => (
|
|
8838
8837
|
* <Provider relationships={relationships}>
|
|
@@ -8862,10 +8861,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8862
8861
|
* object is provided. A component within it then uses the useLinkedRowIds hook.
|
|
8863
8862
|
*
|
|
8864
8863
|
* ```jsx
|
|
8865
|
-
* import {Provider, useLinkedRowIds} from 'tinybase/ui-react';
|
|
8866
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8867
8864
|
* import React from 'react';
|
|
8868
8865
|
* import {createRoot} from 'react-dom/client';
|
|
8866
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8867
|
+
* import {Provider, useLinkedRowIds} from 'tinybase/ui-react';
|
|
8869
8868
|
*
|
|
8870
8869
|
* const App = ({relationships}) => (
|
|
8871
8870
|
* <Provider relationshipsById={{petRelationships: relationships}}>
|
|
@@ -8957,10 +8956,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
8957
8956
|
* listener is removed from the Relationships object.
|
|
8958
8957
|
*
|
|
8959
8958
|
* ```jsx
|
|
8960
|
-
* import {Provider, useRemoteRowIdListener} from 'tinybase/ui-react';
|
|
8961
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
8962
8959
|
* import React from 'react';
|
|
8963
8960
|
* import {createRoot} from 'react-dom/client';
|
|
8961
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
8962
|
+
* import {Provider, useRemoteRowIdListener} from 'tinybase/ui-react';
|
|
8964
8963
|
*
|
|
8965
8964
|
* const App = ({relationships}) => (
|
|
8966
8965
|
* <Provider relationships={relationships}>
|
|
@@ -9063,10 +9062,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9063
9062
|
* listener is removed from the Relationships object.
|
|
9064
9063
|
*
|
|
9065
9064
|
* ```jsx
|
|
9066
|
-
* import {Provider, useLocalRowIdsListener} from 'tinybase/ui-react';
|
|
9067
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
9068
9065
|
* import React from 'react';
|
|
9069
9066
|
* import {createRoot} from 'react-dom/client';
|
|
9067
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
9068
|
+
* import {Provider, useLocalRowIdsListener} from 'tinybase/ui-react';
|
|
9070
9069
|
*
|
|
9071
9070
|
* const App = ({relationships}) => (
|
|
9072
9071
|
* <Provider relationships={relationships}>
|
|
@@ -9163,10 +9162,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9163
9162
|
* listener is removed from the Relationships object.
|
|
9164
9163
|
*
|
|
9165
9164
|
* ```jsx
|
|
9166
|
-
* import {Provider, useLinkedRowIdsListener} from 'tinybase/ui-react';
|
|
9167
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
9168
9165
|
* import React from 'react';
|
|
9169
9166
|
* import {createRoot} from 'react-dom/client';
|
|
9167
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
9168
|
+
* import {Provider, useLinkedRowIdsListener} from 'tinybase/ui-react';
|
|
9170
9169
|
*
|
|
9171
9170
|
* const App = ({relationships}) => (
|
|
9172
9171
|
* <Provider relationships={relationships}>
|
|
@@ -9261,10 +9260,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9261
9260
|
* object creation only occurs once by default.
|
|
9262
9261
|
*
|
|
9263
9262
|
* ```jsx
|
|
9264
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9265
|
-
* import {useCreateQueries, useCreateStore} from 'tinybase/ui-react';
|
|
9266
9263
|
* import React from 'react';
|
|
9267
9264
|
* import {createRoot} from 'react-dom/client';
|
|
9265
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9266
|
+
* import {useCreateQueries, useCreateStore} from 'tinybase/ui-react';
|
|
9268
9267
|
*
|
|
9269
9268
|
* const App = () => {
|
|
9270
9269
|
* const store = useCreateStore(() =>
|
|
@@ -9308,10 +9307,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9308
9307
|
* dependency, and so the Queries object is created again on the second render.
|
|
9309
9308
|
*
|
|
9310
9309
|
* ```jsx
|
|
9311
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9312
|
-
* import {useCreateQueries, useCreateStore} from 'tinybase/ui-react';
|
|
9313
9310
|
* import React from 'react';
|
|
9314
9311
|
* import {createRoot} from 'react-dom/client';
|
|
9312
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9313
|
+
* import {useCreateQueries, useCreateStore} from 'tinybase/ui-react';
|
|
9315
9314
|
*
|
|
9316
9315
|
* const App = () => {
|
|
9317
9316
|
* const store = useCreateStore(() =>
|
|
@@ -9366,15 +9365,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9366
9365
|
* inner component accesses their Ids.
|
|
9367
9366
|
*
|
|
9368
9367
|
* ```jsx
|
|
9368
|
+
* import React from 'react';
|
|
9369
|
+
* import {createRoot} from 'react-dom/client';
|
|
9370
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9369
9371
|
* import {
|
|
9370
9372
|
* Provider,
|
|
9371
9373
|
* useCreateQueries,
|
|
9372
9374
|
* useCreateStore,
|
|
9373
9375
|
* useQueriesIds,
|
|
9374
9376
|
* } from 'tinybase/ui-react';
|
|
9375
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9376
|
-
* import React from 'react';
|
|
9377
|
-
* import {createRoot} from 'react-dom/client';
|
|
9378
9377
|
*
|
|
9379
9378
|
* const App = () => {
|
|
9380
9379
|
* const store1 = useCreateStore(createStore);
|
|
@@ -9428,10 +9427,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9428
9427
|
* a prop.
|
|
9429
9428
|
*
|
|
9430
9429
|
* ```jsx
|
|
9431
|
-
* import {Provider, useQueries} from 'tinybase/ui-react';
|
|
9432
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9433
9430
|
* import React from 'react';
|
|
9434
9431
|
* import {createRoot} from 'react-dom/client';
|
|
9432
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9433
|
+
* import {Provider, useQueries} from 'tinybase/ui-react';
|
|
9435
9434
|
*
|
|
9436
9435
|
* const App = ({queries}) => (
|
|
9437
9436
|
* <Provider queries={queries}>
|
|
@@ -9453,10 +9452,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9453
9452
|
* to have it passed as a prop.
|
|
9454
9453
|
*
|
|
9455
9454
|
* ```jsx
|
|
9456
|
-
* import {Provider, useQueries} from 'tinybase/ui-react';
|
|
9457
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9458
9455
|
* import React from 'react';
|
|
9459
9456
|
* import {createRoot} from 'react-dom/client';
|
|
9457
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9458
|
+
* import {Provider, useQueries} from 'tinybase/ui-react';
|
|
9460
9459
|
*
|
|
9461
9460
|
* const App = ({queries}) => (
|
|
9462
9461
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -9511,10 +9510,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9511
9510
|
* into it, making it more portable.
|
|
9512
9511
|
*
|
|
9513
9512
|
* ```jsx
|
|
9514
|
-
* import {Provider, useQueriesOrQueriesById} from 'tinybase/ui-react';
|
|
9515
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9516
9513
|
* import React from 'react';
|
|
9517
9514
|
* import {createRoot} from 'react-dom/client';
|
|
9515
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9516
|
+
* import {Provider, useQueriesOrQueriesById} from 'tinybase/ui-react';
|
|
9518
9517
|
*
|
|
9519
9518
|
* const App = ({queries}) => (
|
|
9520
9519
|
* <Provider queries={queries}>
|
|
@@ -9586,9 +9585,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9586
9585
|
* re-renders the component.
|
|
9587
9586
|
*
|
|
9588
9587
|
* ```jsx
|
|
9589
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9590
9588
|
* import React from 'react';
|
|
9591
9589
|
* import {createRoot} from 'react-dom/client';
|
|
9590
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9592
9591
|
* import {useQueryIds} from 'tinybase/ui-react';
|
|
9593
9592
|
*
|
|
9594
9593
|
* const store = createStore().setTable('pets', {
|
|
@@ -9653,9 +9652,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9653
9652
|
* re-renders the component.
|
|
9654
9653
|
*
|
|
9655
9654
|
* ```jsx
|
|
9656
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9657
9655
|
* import React from 'react';
|
|
9658
9656
|
* import {createRoot} from 'react-dom/client';
|
|
9657
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9659
9658
|
* import {useResultTable} from 'tinybase/ui-react';
|
|
9660
9659
|
*
|
|
9661
9660
|
* const store = createStore().setTable('pets', {
|
|
@@ -9689,10 +9688,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9689
9688
|
* is provided. A component within it then uses the useResultTable hook.
|
|
9690
9689
|
*
|
|
9691
9690
|
* ```jsx
|
|
9692
|
-
* import {Provider, useResultTable} from 'tinybase/ui-react';
|
|
9693
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9694
9691
|
* import React from 'react';
|
|
9695
9692
|
* import {createRoot} from 'react-dom/client';
|
|
9693
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9694
|
+
* import {Provider, useResultTable} from 'tinybase/ui-react';
|
|
9696
9695
|
*
|
|
9697
9696
|
* const App = ({queries}) => (
|
|
9698
9697
|
* <Provider queries={queries}>
|
|
@@ -9725,10 +9724,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9725
9724
|
* hook.
|
|
9726
9725
|
*
|
|
9727
9726
|
* ```jsx
|
|
9728
|
-
* import {Provider, useResultTable} from 'tinybase/ui-react';
|
|
9729
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9730
9727
|
* import React from 'react';
|
|
9731
9728
|
* import {createRoot} from 'react-dom/client';
|
|
9729
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9730
|
+
* import {Provider, useResultTable} from 'tinybase/ui-react';
|
|
9732
9731
|
*
|
|
9733
9732
|
* const App = ({queries}) => (
|
|
9734
9733
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -9798,9 +9797,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9798
9797
|
* query re-renders the component.
|
|
9799
9798
|
*
|
|
9800
9799
|
* ```jsx
|
|
9801
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9802
9800
|
* import React from 'react';
|
|
9803
9801
|
* import {createRoot} from 'react-dom/client';
|
|
9802
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9804
9803
|
* import {useResultTableCellIds} from 'tinybase/ui-react';
|
|
9805
9804
|
*
|
|
9806
9805
|
* const store = createStore().setTable('pets', {
|
|
@@ -9837,10 +9836,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9837
9836
|
* is provided. A component within it then uses the useResultTableCellIds hook.
|
|
9838
9837
|
*
|
|
9839
9838
|
* ```jsx
|
|
9840
|
-
* import {Provider, useResultTableCellIds} from 'tinybase/ui-react';
|
|
9841
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9842
9839
|
* import React from 'react';
|
|
9843
9840
|
* import {createRoot} from 'react-dom/client';
|
|
9841
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9842
|
+
* import {Provider, useResultTableCellIds} from 'tinybase/ui-react';
|
|
9844
9843
|
*
|
|
9845
9844
|
* const App = ({queries}) => (
|
|
9846
9845
|
* <Provider queries={queries}>
|
|
@@ -9873,10 +9872,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9873
9872
|
* useResultTableCellIds hook.
|
|
9874
9873
|
*
|
|
9875
9874
|
* ```jsx
|
|
9876
|
-
* import {Provider, useResultTableCellIds} from 'tinybase/ui-react';
|
|
9877
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9878
9875
|
* import React from 'react';
|
|
9879
9876
|
* import {createRoot} from 'react-dom/client';
|
|
9877
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9878
|
+
* import {Provider, useResultTableCellIds} from 'tinybase/ui-react';
|
|
9880
9879
|
*
|
|
9881
9880
|
* const App = ({queries}) => (
|
|
9882
9881
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -9952,9 +9951,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9952
9951
|
* re-renders the component.
|
|
9953
9952
|
*
|
|
9954
9953
|
* ```jsx
|
|
9955
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9956
9954
|
* import React from 'react';
|
|
9957
9955
|
* import {createRoot} from 'react-dom/client';
|
|
9956
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9958
9957
|
* import {useResultRowCount} from 'tinybase/ui-react';
|
|
9959
9958
|
*
|
|
9960
9959
|
* const store = createStore().setTable('pets', {
|
|
@@ -9986,10 +9985,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
9986
9985
|
* is provided. A component within it then uses the useResultRowCount hook.
|
|
9987
9986
|
*
|
|
9988
9987
|
* ```jsx
|
|
9989
|
-
* import {Provider, useResultRowCount} from 'tinybase/ui-react';
|
|
9990
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
9991
9988
|
* import React from 'react';
|
|
9992
9989
|
* import {createRoot} from 'react-dom/client';
|
|
9990
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
9991
|
+
* import {Provider, useResultRowCount} from 'tinybase/ui-react';
|
|
9993
9992
|
*
|
|
9994
9993
|
* const App = ({queries}) => (
|
|
9995
9994
|
* <Provider queries={queries}>
|
|
@@ -10019,10 +10018,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10019
10018
|
* hook.
|
|
10020
10019
|
*
|
|
10021
10020
|
* ```jsx
|
|
10022
|
-
* import {Provider, useResultRowCount} from 'tinybase/ui-react';
|
|
10023
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10024
10021
|
* import React from 'react';
|
|
10025
10022
|
* import {createRoot} from 'react-dom/client';
|
|
10023
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10024
|
+
* import {Provider, useResultRowCount} from 'tinybase/ui-react';
|
|
10026
10025
|
*
|
|
10027
10026
|
* const App = ({queries}) => (
|
|
10028
10027
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10092,9 +10091,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10092
10091
|
* re-renders the component.
|
|
10093
10092
|
*
|
|
10094
10093
|
* ```jsx
|
|
10095
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10096
10094
|
* import React from 'react';
|
|
10097
10095
|
* import {createRoot} from 'react-dom/client';
|
|
10096
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10098
10097
|
* import {useResultRowIds} from 'tinybase/ui-react';
|
|
10099
10098
|
*
|
|
10100
10099
|
* const store = createStore().setTable('pets', {
|
|
@@ -10128,10 +10127,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10128
10127
|
* is provided. A component within it then uses the useResultRowIds hook.
|
|
10129
10128
|
*
|
|
10130
10129
|
* ```jsx
|
|
10131
|
-
* import {Provider, useResultRowIds} from 'tinybase/ui-react';
|
|
10132
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10133
10130
|
* import React from 'react';
|
|
10134
10131
|
* import {createRoot} from 'react-dom/client';
|
|
10132
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10133
|
+
* import {Provider, useResultRowIds} from 'tinybase/ui-react';
|
|
10135
10134
|
*
|
|
10136
10135
|
* const App = ({queries}) => (
|
|
10137
10136
|
* <Provider queries={queries}>
|
|
@@ -10163,10 +10162,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10163
10162
|
* hook.
|
|
10164
10163
|
*
|
|
10165
10164
|
* ```jsx
|
|
10166
|
-
* import {Provider, useResultRowIds} from 'tinybase/ui-react';
|
|
10167
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10168
10165
|
* import React from 'react';
|
|
10169
10166
|
* import {createRoot} from 'react-dom/client';
|
|
10167
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10168
|
+
* import {Provider, useResultRowIds} from 'tinybase/ui-react';
|
|
10170
10169
|
*
|
|
10171
10170
|
* const App = ({queries}) => (
|
|
10172
10171
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10244,9 +10243,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10244
10243
|
* query re-renders the component.
|
|
10245
10244
|
*
|
|
10246
10245
|
* ```jsx
|
|
10247
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10248
10246
|
* import React from 'react';
|
|
10249
10247
|
* import {createRoot} from 'react-dom/client';
|
|
10248
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10250
10249
|
* import {useResultSortedRowIds} from 'tinybase/ui-react';
|
|
10251
10250
|
*
|
|
10252
10251
|
* const store = createStore().setTable('pets', {
|
|
@@ -10291,10 +10290,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10291
10290
|
* is provided. A component within it then uses the useResultSortedRowIds hook.
|
|
10292
10291
|
*
|
|
10293
10292
|
* ```jsx
|
|
10294
|
-
* import {Provider, useResultSortedRowIds} from 'tinybase/ui-react';
|
|
10295
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10296
10293
|
* import React from 'react';
|
|
10297
10294
|
* import {createRoot} from 'react-dom/client';
|
|
10295
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10296
|
+
* import {Provider, useResultSortedRowIds} from 'tinybase/ui-react';
|
|
10298
10297
|
*
|
|
10299
10298
|
* const App = ({queries}) => (
|
|
10300
10299
|
* <Provider queries={queries}>
|
|
@@ -10328,10 +10327,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10328
10327
|
* useResultSortedRowIds hook.
|
|
10329
10328
|
*
|
|
10330
10329
|
* ```jsx
|
|
10331
|
-
* import {Provider, useResultSortedRowIds} from 'tinybase/ui-react';
|
|
10332
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10333
10330
|
* import React from 'react';
|
|
10334
10331
|
* import {createRoot} from 'react-dom/client';
|
|
10332
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10333
|
+
* import {Provider, useResultSortedRowIds} from 'tinybase/ui-react';
|
|
10335
10334
|
*
|
|
10336
10335
|
* const App = ({queries}) => (
|
|
10337
10336
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10418,9 +10417,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10418
10417
|
* re-renders the component.
|
|
10419
10418
|
*
|
|
10420
10419
|
* ```jsx
|
|
10421
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10422
10420
|
* import React from 'react';
|
|
10423
10421
|
* import {createRoot} from 'react-dom/client';
|
|
10422
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10424
10423
|
* import {useResultRow} from 'tinybase/ui-react';
|
|
10425
10424
|
*
|
|
10426
10425
|
* const store = createStore().setTable('pets', {
|
|
@@ -10454,10 +10453,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10454
10453
|
* is provided. A component within it then uses the useResultRow hook.
|
|
10455
10454
|
*
|
|
10456
10455
|
* ```jsx
|
|
10457
|
-
* import {Provider, useResultRow} from 'tinybase/ui-react';
|
|
10458
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10459
10456
|
* import React from 'react';
|
|
10460
10457
|
* import {createRoot} from 'react-dom/client';
|
|
10458
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10459
|
+
* import {Provider, useResultRow} from 'tinybase/ui-react';
|
|
10461
10460
|
*
|
|
10462
10461
|
* const App = ({queries}) => (
|
|
10463
10462
|
* <Provider queries={queries}>
|
|
@@ -10489,10 +10488,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10489
10488
|
* hook.
|
|
10490
10489
|
*
|
|
10491
10490
|
* ```jsx
|
|
10492
|
-
* import {Provider, useResultRow} from 'tinybase/ui-react';
|
|
10493
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10494
10491
|
* import React from 'react';
|
|
10495
10492
|
* import {createRoot} from 'react-dom/client';
|
|
10493
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10494
|
+
* import {Provider, useResultRow} from 'tinybase/ui-react';
|
|
10496
10495
|
*
|
|
10497
10496
|
* const App = ({queries}) => (
|
|
10498
10497
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10567,9 +10566,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10567
10566
|
* re-renders the component.
|
|
10568
10567
|
*
|
|
10569
10568
|
* ```jsx
|
|
10570
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10571
10569
|
* import React from 'react';
|
|
10572
10570
|
* import {createRoot} from 'react-dom/client';
|
|
10571
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10573
10572
|
* import {useResultCellIds} from 'tinybase/ui-react';
|
|
10574
10573
|
*
|
|
10575
10574
|
* const store = createStore().setTable('pets', {
|
|
@@ -10607,10 +10606,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10607
10606
|
* is provided. A component within it then uses the useResultCellIds hook.
|
|
10608
10607
|
*
|
|
10609
10608
|
* ```jsx
|
|
10610
|
-
* import {Provider, useResultCellIds} from 'tinybase/ui-react';
|
|
10611
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10612
10609
|
* import React from 'react';
|
|
10613
10610
|
* import {createRoot} from 'react-dom/client';
|
|
10611
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10612
|
+
* import {Provider, useResultCellIds} from 'tinybase/ui-react';
|
|
10614
10613
|
*
|
|
10615
10614
|
* const App = ({queries}) => (
|
|
10616
10615
|
* <Provider queries={queries}>
|
|
@@ -10643,10 +10642,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10643
10642
|
* hook.
|
|
10644
10643
|
*
|
|
10645
10644
|
* ```jsx
|
|
10646
|
-
* import {Provider, useResultCellIds} from 'tinybase/ui-react';
|
|
10647
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10648
10645
|
* import React from 'react';
|
|
10649
10646
|
* import {createRoot} from 'react-dom/client';
|
|
10647
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10648
|
+
* import {Provider, useResultCellIds} from 'tinybase/ui-react';
|
|
10650
10649
|
*
|
|
10651
10650
|
* const App = ({queries}) => (
|
|
10652
10651
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10723,9 +10722,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10723
10722
|
* re-renders the component.
|
|
10724
10723
|
*
|
|
10725
10724
|
* ```jsx
|
|
10726
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10727
10725
|
* import React from 'react';
|
|
10728
10726
|
* import {createRoot} from 'react-dom/client';
|
|
10727
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10729
10728
|
* import {useResultCell} from 'tinybase/ui-react';
|
|
10730
10729
|
*
|
|
10731
10730
|
* const store = createStore().setTable('pets', {
|
|
@@ -10761,10 +10760,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10761
10760
|
* is provided. A component within it then uses the useResultCell hook.
|
|
10762
10761
|
*
|
|
10763
10762
|
* ```jsx
|
|
10764
|
-
* import {Provider, useResultCell} from 'tinybase/ui-react';
|
|
10765
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10766
10763
|
* import React from 'react';
|
|
10767
10764
|
* import {createRoot} from 'react-dom/client';
|
|
10765
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10766
|
+
* import {Provider, useResultCell} from 'tinybase/ui-react';
|
|
10768
10767
|
*
|
|
10769
10768
|
* const App = ({queries}) => (
|
|
10770
10769
|
* <Provider queries={queries}>
|
|
@@ -10797,10 +10796,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10797
10796
|
* hook.
|
|
10798
10797
|
*
|
|
10799
10798
|
* ```jsx
|
|
10800
|
-
* import {Provider, useResultCell} from 'tinybase/ui-react';
|
|
10801
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10802
10799
|
* import React from 'react';
|
|
10803
10800
|
* import {createRoot} from 'react-dom/client';
|
|
10801
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10802
|
+
* import {Provider, useResultCell} from 'tinybase/ui-react';
|
|
10804
10803
|
*
|
|
10805
10804
|
* const App = ({queries}) => (
|
|
10806
10805
|
* <Provider queriesById={{petQueries: queries}}>
|
|
@@ -10880,10 +10879,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10880
10879
|
* listener is removed from the Queries object.
|
|
10881
10880
|
*
|
|
10882
10881
|
* ```jsx
|
|
10883
|
-
* import {Provider, useResultTableListener} from 'tinybase/ui-react';
|
|
10884
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10885
10882
|
* import React from 'react';
|
|
10886
10883
|
* import {createRoot} from 'react-dom/client';
|
|
10884
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10885
|
+
* import {Provider, useResultTableListener} from 'tinybase/ui-react';
|
|
10887
10886
|
*
|
|
10888
10887
|
* const App = ({queries}) => (
|
|
10889
10888
|
* <Provider queries={queries}>
|
|
@@ -10974,10 +10973,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
10974
10973
|
* listener is removed from the Queries object.
|
|
10975
10974
|
*
|
|
10976
10975
|
* ```jsx
|
|
10977
|
-
* import {Provider, useResultTableCellIdsListener} from 'tinybase/ui-react';
|
|
10978
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
10979
10976
|
* import React from 'react';
|
|
10980
10977
|
* import {createRoot} from 'react-dom/client';
|
|
10978
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
10979
|
+
* import {Provider, useResultTableCellIdsListener} from 'tinybase/ui-react';
|
|
10981
10980
|
*
|
|
10982
10981
|
* const App = ({queries}) => (
|
|
10983
10982
|
* <Provider queries={queries}>
|
|
@@ -11071,10 +11070,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11071
11070
|
* listener is removed from the Queries object.
|
|
11072
11071
|
*
|
|
11073
11072
|
* ```jsx
|
|
11074
|
-
* import {Provider, useResultRowCountListener} from 'tinybase/ui-react';
|
|
11075
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11076
11073
|
* import React from 'react';
|
|
11077
11074
|
* import {createRoot} from 'react-dom/client';
|
|
11075
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11076
|
+
* import {Provider, useResultRowCountListener} from 'tinybase/ui-react';
|
|
11078
11077
|
*
|
|
11079
11078
|
* const App = ({queries}) => (
|
|
11080
11079
|
* <Provider queries={queries}>
|
|
@@ -11164,10 +11163,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11164
11163
|
* listener is removed from the Queries object.
|
|
11165
11164
|
*
|
|
11166
11165
|
* ```jsx
|
|
11167
|
-
* import {Provider, useResultRowIdsListener} from 'tinybase/ui-react';
|
|
11168
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11169
11166
|
* import React from 'react';
|
|
11170
11167
|
* import {createRoot} from 'react-dom/client';
|
|
11168
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11169
|
+
* import {Provider, useResultRowIdsListener} from 'tinybase/ui-react';
|
|
11171
11170
|
*
|
|
11172
11171
|
* const App = ({queries}) => (
|
|
11173
11172
|
* <Provider queries={queries}>
|
|
@@ -11263,10 +11262,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11263
11262
|
* listener is removed from the Queries object.
|
|
11264
11263
|
*
|
|
11265
11264
|
* ```jsx
|
|
11266
|
-
* import {Provider, useResultSortedRowIdsListener} from 'tinybase/ui-react';
|
|
11267
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11268
11265
|
* import React from 'react';
|
|
11269
11266
|
* import {createRoot} from 'react-dom/client';
|
|
11267
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11268
|
+
* import {Provider, useResultSortedRowIdsListener} from 'tinybase/ui-react';
|
|
11270
11269
|
*
|
|
11271
11270
|
* const App = ({queries}) => (
|
|
11272
11271
|
* <Provider queries={queries}>
|
|
@@ -11372,10 +11371,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11372
11371
|
* listener is removed from the Queries object.
|
|
11373
11372
|
*
|
|
11374
11373
|
* ```jsx
|
|
11375
|
-
* import {Provider, useResultRowListener} from 'tinybase/ui-react';
|
|
11376
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11377
11374
|
* import React from 'react';
|
|
11378
11375
|
* import {createRoot} from 'react-dom/client';
|
|
11376
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11377
|
+
* import {Provider, useResultRowListener} from 'tinybase/ui-react';
|
|
11379
11378
|
*
|
|
11380
11379
|
* const App = ({queries}) => (
|
|
11381
11380
|
* <Provider queries={queries}>
|
|
@@ -11470,10 +11469,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11470
11469
|
* listener is removed from the Queries object.
|
|
11471
11470
|
*
|
|
11472
11471
|
* ```jsx
|
|
11473
|
-
* import {Provider, useResultCellIdsListener} from 'tinybase/ui-react';
|
|
11474
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11475
11472
|
* import React from 'react';
|
|
11476
11473
|
* import {createRoot} from 'react-dom/client';
|
|
11474
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11475
|
+
* import {Provider, useResultCellIdsListener} from 'tinybase/ui-react';
|
|
11477
11476
|
*
|
|
11478
11477
|
* const App = ({queries}) => (
|
|
11479
11478
|
* <Provider queries={queries}>
|
|
@@ -11577,10 +11576,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11577
11576
|
* listener is removed from the Queries object.
|
|
11578
11577
|
*
|
|
11579
11578
|
* ```jsx
|
|
11580
|
-
* import {Provider, useResultCellListener} from 'tinybase/ui-react';
|
|
11581
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
11582
11579
|
* import React from 'react';
|
|
11583
11580
|
* import {createRoot} from 'react-dom/client';
|
|
11581
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
11582
|
+
* import {Provider, useResultCellListener} from 'tinybase/ui-react';
|
|
11584
11583
|
*
|
|
11585
11584
|
* const App = ({queries}) => (
|
|
11586
11585
|
* <Provider queries={queries}>
|
|
@@ -11673,10 +11672,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11673
11672
|
* Checkpoints object creation only occurs once by default.
|
|
11674
11673
|
*
|
|
11675
11674
|
* ```jsx
|
|
11676
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11677
|
-
* import {useCreateCheckpoints, useCreateStore} from 'tinybase/ui-react';
|
|
11678
11675
|
* import React from 'react';
|
|
11679
11676
|
* import {createRoot} from 'react-dom/client';
|
|
11677
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11678
|
+
* import {useCreateCheckpoints, useCreateStore} from 'tinybase/ui-react';
|
|
11680
11679
|
*
|
|
11681
11680
|
* const App = () => {
|
|
11682
11681
|
* const store = useCreateStore(createStore);
|
|
@@ -11706,10 +11705,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11706
11705
|
* render.
|
|
11707
11706
|
*
|
|
11708
11707
|
* ```jsx
|
|
11709
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11710
|
-
* import {useCreateCheckpoints, useCreateStore} from 'tinybase/ui-react';
|
|
11711
11708
|
* import React from 'react';
|
|
11712
11709
|
* import {createRoot} from 'react-dom/client';
|
|
11710
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11711
|
+
* import {useCreateCheckpoints, useCreateStore} from 'tinybase/ui-react';
|
|
11713
11712
|
*
|
|
11714
11713
|
* const App = ({size}) => {
|
|
11715
11714
|
* const store = useCreateStore(createStore);
|
|
@@ -11756,15 +11755,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11756
11755
|
* inner component accesses their Ids.
|
|
11757
11756
|
*
|
|
11758
11757
|
* ```jsx
|
|
11758
|
+
* import React from 'react';
|
|
11759
|
+
* import {createRoot} from 'react-dom/client';
|
|
11760
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11759
11761
|
* import {
|
|
11760
11762
|
* Provider,
|
|
11761
11763
|
* useCheckpointsIds,
|
|
11762
11764
|
* useCreateCheckpoints,
|
|
11763
11765
|
* useCreateStore,
|
|
11764
11766
|
* } from 'tinybase/ui-react';
|
|
11765
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11766
|
-
* import React from 'react';
|
|
11767
|
-
* import {createRoot} from 'react-dom/client';
|
|
11768
11767
|
*
|
|
11769
11768
|
* const App = () => {
|
|
11770
11769
|
* const store1 = useCreateStore(createStore);
|
|
@@ -11818,10 +11817,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11818
11817
|
* it passed as a prop.
|
|
11819
11818
|
*
|
|
11820
11819
|
* ```jsx
|
|
11821
|
-
* import {Provider, useCheckpoints} from 'tinybase/ui-react';
|
|
11822
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11823
11820
|
* import React from 'react';
|
|
11824
11821
|
* import {createRoot} from 'react-dom/client';
|
|
11822
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11823
|
+
* import {Provider, useCheckpoints} from 'tinybase/ui-react';
|
|
11825
11824
|
*
|
|
11826
11825
|
* const App = ({checkpoints}) => (
|
|
11827
11826
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -11846,10 +11845,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11846
11845
|
* the need to have it passed as a prop.
|
|
11847
11846
|
*
|
|
11848
11847
|
* ```jsx
|
|
11849
|
-
* import {Provider, useCheckpoints} from 'tinybase/ui-react';
|
|
11850
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11851
11848
|
* import React from 'react';
|
|
11852
11849
|
* import {createRoot} from 'react-dom/client';
|
|
11850
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11851
|
+
* import {Provider, useCheckpoints} from 'tinybase/ui-react';
|
|
11853
11852
|
*
|
|
11854
11853
|
* const App = ({checkpoints}) => (
|
|
11855
11854
|
* <Provider checkpointsById={{petStore: checkpoints}}>
|
|
@@ -11909,13 +11908,13 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11909
11908
|
* portable.
|
|
11910
11909
|
*
|
|
11911
11910
|
* ```jsx
|
|
11911
|
+
* import React from 'react';
|
|
11912
|
+
* import {createRoot} from 'react-dom/client';
|
|
11913
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11912
11914
|
* import {
|
|
11913
11915
|
* Provider,
|
|
11914
11916
|
* useCheckpointsOrCheckpointsById,
|
|
11915
11917
|
* } from 'tinybase/ui-react';
|
|
11916
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11917
|
-
* import React from 'react';
|
|
11918
|
-
* import {createRoot} from 'react-dom/client';
|
|
11919
11918
|
*
|
|
11920
11919
|
* const App = ({checkpoints}) => (
|
|
11921
11920
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -11984,9 +11983,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
11984
11983
|
* Ids re-renders the component.
|
|
11985
11984
|
*
|
|
11986
11985
|
* ```jsx
|
|
11987
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11988
11986
|
* import React from 'react';
|
|
11989
11987
|
* import {createRoot} from 'react-dom/client';
|
|
11988
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
11990
11989
|
* import {useCheckpointIds} from 'tinybase/ui-react';
|
|
11991
11990
|
*
|
|
11992
11991
|
* const store = createStore().setTable('pets', {fido: {species: 'dog'}});
|
|
@@ -12014,10 +12013,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12014
12013
|
* hook.
|
|
12015
12014
|
*
|
|
12016
12015
|
* ```jsx
|
|
12017
|
-
* import {Provider, useCheckpointIds} from 'tinybase/ui-react';
|
|
12018
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12019
12016
|
* import React from 'react';
|
|
12020
12017
|
* import {createRoot} from 'react-dom/client';
|
|
12018
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12019
|
+
* import {Provider, useCheckpointIds} from 'tinybase/ui-react';
|
|
12021
12020
|
*
|
|
12022
12021
|
* const App = ({checkpoints}) => (
|
|
12023
12022
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -12042,10 +12041,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12042
12041
|
* hook.
|
|
12043
12042
|
*
|
|
12044
12043
|
* ```jsx
|
|
12045
|
-
* import {Provider, useCheckpointIds} from 'tinybase/ui-react';
|
|
12046
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12047
12044
|
* import React from 'react';
|
|
12048
12045
|
* import {createRoot} from 'react-dom/client';
|
|
12046
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12047
|
+
* import {Provider, useCheckpointIds} from 'tinybase/ui-react';
|
|
12049
12048
|
*
|
|
12050
12049
|
* const App = ({checkpoints}) => (
|
|
12051
12050
|
* <Provider checkpointsById={{petCheckpoints: checkpoints}}>
|
|
@@ -12108,9 +12107,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12108
12107
|
* re-renders the component.
|
|
12109
12108
|
*
|
|
12110
12109
|
* ```jsx
|
|
12111
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12112
12110
|
* import React from 'react';
|
|
12113
12111
|
* import {createRoot} from 'react-dom/client';
|
|
12112
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12114
12113
|
* import {useCheckpoint} from 'tinybase/ui-react';
|
|
12115
12114
|
*
|
|
12116
12115
|
* const store = createStore().setTable('pets', {fido: {species: 'dog'}});
|
|
@@ -12133,10 +12132,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12133
12132
|
* hook.
|
|
12134
12133
|
*
|
|
12135
12134
|
* ```jsx
|
|
12136
|
-
* import {Provider, useCheckpoint} from 'tinybase/ui-react';
|
|
12137
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12138
12135
|
* import React from 'react';
|
|
12139
12136
|
* import {createRoot} from 'react-dom/client';
|
|
12137
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12138
|
+
* import {Provider, useCheckpoint} from 'tinybase/ui-react';
|
|
12140
12139
|
*
|
|
12141
12140
|
* const App = ({checkpoints}) => (
|
|
12142
12141
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -12161,10 +12160,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12161
12160
|
* hook.
|
|
12162
12161
|
*
|
|
12163
12162
|
* ```jsx
|
|
12164
|
-
* import {Provider, useCheckpoint} from 'tinybase/ui-react';
|
|
12165
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12166
12163
|
* import React from 'react';
|
|
12167
12164
|
* import {createRoot} from 'react-dom/client';
|
|
12165
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12166
|
+
* import {Provider, useCheckpoint} from 'tinybase/ui-react';
|
|
12168
12167
|
*
|
|
12169
12168
|
* const App = ({checkpoints}) => (
|
|
12170
12169
|
* <Provider checkpointsById={{petCheckpoints: checkpoints}}>
|
|
@@ -12248,9 +12247,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12248
12247
|
* handler which sets a checkpoint when the `span` element is clicked.
|
|
12249
12248
|
*
|
|
12250
12249
|
* ```jsx
|
|
12251
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12252
12250
|
* import React from 'react';
|
|
12253
12251
|
* import {createRoot} from 'react-dom/client';
|
|
12252
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12254
12253
|
* import {useSetCheckpointCallback} from 'tinybase/ui-react';
|
|
12255
12254
|
*
|
|
12256
12255
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12322,9 +12321,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12322
12321
|
* clicked.
|
|
12323
12322
|
*
|
|
12324
12323
|
* ```jsx
|
|
12325
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12326
12324
|
* import React from 'react';
|
|
12327
12325
|
* import {createRoot} from 'react-dom/client';
|
|
12326
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12328
12327
|
* import {useGoBackwardCallback} from 'tinybase/ui-react';
|
|
12329
12328
|
*
|
|
12330
12329
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12383,9 +12382,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12383
12382
|
* clicked.
|
|
12384
12383
|
*
|
|
12385
12384
|
* ```jsx
|
|
12386
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12387
12385
|
* import React from 'react';
|
|
12388
12386
|
* import {createRoot} from 'react-dom/client';
|
|
12387
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12389
12388
|
* import {useGoForwardCallback} from 'tinybase/ui-react';
|
|
12390
12389
|
*
|
|
12391
12390
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12477,9 +12476,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12477
12476
|
* moves to a checkpoint when the `span` element is clicked.
|
|
12478
12477
|
*
|
|
12479
12478
|
* ```jsx
|
|
12480
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12481
12479
|
* import React from 'react';
|
|
12482
12480
|
* import {createRoot} from 'react-dom/client';
|
|
12481
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12483
12482
|
* import {useGoToCallback} from 'tinybase/ui-react';
|
|
12484
12483
|
*
|
|
12485
12484
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12544,9 +12543,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12544
12543
|
* This example uses the useUndoInformation hook to create an undo button.
|
|
12545
12544
|
*
|
|
12546
12545
|
* ```jsx
|
|
12547
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12548
12546
|
* import React from 'react';
|
|
12549
12547
|
* import {createRoot} from 'react-dom/client';
|
|
12548
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12550
12549
|
* import {useUndoInformation} from 'tinybase/ui-react';
|
|
12551
12550
|
*
|
|
12552
12551
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12604,9 +12603,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12604
12603
|
* This example uses the useUndoInformation hook to create a redo button.
|
|
12605
12604
|
*
|
|
12606
12605
|
* ```jsx
|
|
12607
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12608
12606
|
* import React from 'react';
|
|
12609
12607
|
* import {createRoot} from 'react-dom/client';
|
|
12608
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12610
12609
|
* import {useRedoInformation} from 'tinybase/ui-react';
|
|
12611
12610
|
*
|
|
12612
12611
|
* const store = createStore().setTables({pets: {nemo: {species: 'fish'}}});
|
|
@@ -12677,10 +12676,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12677
12676
|
* listener is removed from the Store.
|
|
12678
12677
|
*
|
|
12679
12678
|
* ```jsx
|
|
12680
|
-
* import {Provider, useCheckpointIdsListener} from 'tinybase/ui-react';
|
|
12681
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12682
12679
|
* import React from 'react';
|
|
12683
12680
|
* import {createRoot} from 'react-dom/client';
|
|
12681
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12682
|
+
* import {Provider, useCheckpointIdsListener} from 'tinybase/ui-react';
|
|
12684
12683
|
*
|
|
12685
12684
|
* const App = ({checkpoints}) => (
|
|
12686
12685
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -12764,10 +12763,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12764
12763
|
* listener is removed from the Store.
|
|
12765
12764
|
*
|
|
12766
12765
|
* ```jsx
|
|
12767
|
-
* import {Provider, useCheckpointListener} from 'tinybase/ui-react';
|
|
12768
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12769
12766
|
* import React from 'react';
|
|
12770
12767
|
* import {createRoot} from 'react-dom/client';
|
|
12768
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
12769
|
+
* import {Provider, useCheckpointListener} from 'tinybase/ui-react';
|
|
12771
12770
|
*
|
|
12772
12771
|
* const App = ({checkpoints}) => (
|
|
12773
12772
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -12898,15 +12897,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12898
12897
|
* occurs once by default.
|
|
12899
12898
|
*
|
|
12900
12899
|
* ```jsx
|
|
12900
|
+
* import React from 'react';
|
|
12901
|
+
* import {createRoot} from 'react-dom/client';
|
|
12902
|
+
* import {createStore} from 'tinybase';
|
|
12903
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
12901
12904
|
* import {
|
|
12902
12905
|
* useCreatePersister,
|
|
12903
12906
|
* useCreateStore,
|
|
12904
12907
|
* useTables,
|
|
12905
12908
|
* } from 'tinybase/ui-react';
|
|
12906
|
-
* import React from 'react';
|
|
12907
|
-
* import {createRoot} from 'react-dom/client';
|
|
12908
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
12909
|
-
* import {createStore} from 'tinybase';
|
|
12910
12909
|
*
|
|
12911
12910
|
* const App = () => {
|
|
12912
12911
|
* const store = useCreateStore(createStore);
|
|
@@ -12952,15 +12951,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
12952
12951
|
* destroyed and the `destroy` parameter is called for it.
|
|
12953
12952
|
*
|
|
12954
12953
|
* ```jsx
|
|
12954
|
+
* import React from 'react';
|
|
12955
|
+
* import {createRoot} from 'react-dom/client';
|
|
12956
|
+
* import {createStore} from 'tinybase';
|
|
12957
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
12955
12958
|
* import {
|
|
12956
12959
|
* useCreatePersister,
|
|
12957
12960
|
* useCreateStore,
|
|
12958
12961
|
* useTables,
|
|
12959
12962
|
* } from 'tinybase/ui-react';
|
|
12960
|
-
* import React from 'react';
|
|
12961
|
-
* import {createRoot} from 'react-dom/client';
|
|
12962
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
12963
|
-
* import {createStore} from 'tinybase';
|
|
12964
12963
|
*
|
|
12965
12964
|
* const App = ({sessionKey}) => {
|
|
12966
12965
|
* const store = useCreateStore(createStore);
|
|
@@ -13037,16 +13036,16 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13037
13036
|
* inner component accesses their Ids.
|
|
13038
13037
|
*
|
|
13039
13038
|
* ```jsx
|
|
13039
|
+
* import React from 'react';
|
|
13040
|
+
* import {createRoot} from 'react-dom/client';
|
|
13041
|
+
* import {createStore} from 'tinybase';
|
|
13042
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13040
13043
|
* import {
|
|
13041
13044
|
* Provider,
|
|
13042
13045
|
* useCreatePersister,
|
|
13043
13046
|
* useCreateStore,
|
|
13044
13047
|
* usePersisterIds,
|
|
13045
13048
|
* } from 'tinybase/ui-react';
|
|
13046
|
-
* import React from 'react';
|
|
13047
|
-
* import {createRoot} from 'react-dom/client';
|
|
13048
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13049
|
-
* import {createStore} from 'tinybase';
|
|
13050
13049
|
*
|
|
13051
13050
|
* const App = () => {
|
|
13052
13051
|
* const store1 = useCreateStore(createStore);
|
|
@@ -13106,11 +13105,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13106
13105
|
* it passed as a prop.
|
|
13107
13106
|
*
|
|
13108
13107
|
* ```jsx
|
|
13109
|
-
* import {Provider, usePersister} from 'tinybase/ui-react';
|
|
13110
13108
|
* import React from 'react';
|
|
13111
13109
|
* import {createRoot} from 'react-dom/client';
|
|
13112
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13113
13110
|
* import {createStore} from 'tinybase';
|
|
13111
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13112
|
+
* import {Provider, usePersister} from 'tinybase/ui-react';
|
|
13114
13113
|
*
|
|
13115
13114
|
* const App = ({persister}) => (
|
|
13116
13115
|
* <Provider persister={persister}>
|
|
@@ -13133,11 +13132,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13133
13132
|
* the need to have it passed as a prop.
|
|
13134
13133
|
*
|
|
13135
13134
|
* ```jsx
|
|
13136
|
-
* import {Provider, usePersister} from 'tinybase/ui-react';
|
|
13137
13135
|
* import React from 'react';
|
|
13138
13136
|
* import {createRoot} from 'react-dom/client';
|
|
13139
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13140
13137
|
* import {createStore} from 'tinybase';
|
|
13138
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13139
|
+
* import {Provider, usePersister} from 'tinybase/ui-react';
|
|
13141
13140
|
*
|
|
13142
13141
|
* const App = ({persister}) => (
|
|
13143
13142
|
* <Provider persistersById={{petPersister: persister}}>
|
|
@@ -13194,11 +13193,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13194
13193
|
* portable.
|
|
13195
13194
|
*
|
|
13196
13195
|
* ```jsx
|
|
13197
|
-
* import {Provider, usePersisterOrPersisterById} from 'tinybase/ui-react';
|
|
13198
13196
|
* import React from 'react';
|
|
13199
13197
|
* import {createRoot} from 'react-dom/client';
|
|
13200
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13201
13198
|
* import {createStore} from 'tinybase';
|
|
13199
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13200
|
+
* import {Provider, usePersisterOrPersisterById} from 'tinybase/ui-react';
|
|
13202
13201
|
*
|
|
13203
13202
|
* const App = ({persister}) => (
|
|
13204
13203
|
* <Provider persister={persister}>
|
|
@@ -13264,8 +13263,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13264
13263
|
* ```jsx
|
|
13265
13264
|
* import React from 'react';
|
|
13266
13265
|
* import {createRoot} from 'react-dom/client';
|
|
13267
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13268
13266
|
* import {createStore} from 'tinybase';
|
|
13267
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13269
13268
|
* import {usePersisterStatus} from 'tinybase/ui-react';
|
|
13270
13269
|
*
|
|
13271
13270
|
* const persister = createSessionPersister(createStore(), 'pets');
|
|
@@ -13282,11 +13281,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13282
13281
|
* provided. A component within it then uses the usePersisterStatus hook.
|
|
13283
13282
|
*
|
|
13284
13283
|
* ```jsx
|
|
13285
|
-
* import {Provider, usePersisterStatus} from 'tinybase/ui-react';
|
|
13286
13284
|
* import React from 'react';
|
|
13287
13285
|
* import {createRoot} from 'react-dom/client';
|
|
13288
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13289
13286
|
* import {createStore} from 'tinybase';
|
|
13287
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13288
|
+
* import {Provider, usePersisterStatus} from 'tinybase/ui-react';
|
|
13290
13289
|
*
|
|
13291
13290
|
* const App = ({persister}) => (
|
|
13292
13291
|
* <Provider persister={persister}>
|
|
@@ -13306,11 +13305,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13306
13305
|
* named by Id. A component within it then uses the usePersisterStatus hook.
|
|
13307
13306
|
*
|
|
13308
13307
|
* ```jsx
|
|
13309
|
-
* import {Provider, usePersisterStatus} from 'tinybase/ui-react';
|
|
13310
13308
|
* import React from 'react';
|
|
13311
13309
|
* import {createRoot} from 'react-dom/client';
|
|
13312
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13313
13310
|
* import {createStore} from 'tinybase';
|
|
13311
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13312
|
+
* import {Provider, usePersisterStatus} from 'tinybase/ui-react';
|
|
13314
13313
|
*
|
|
13315
13314
|
* const App = ({persister}) => (
|
|
13316
13315
|
* <Provider persistersById={{petPersister: persister}}>
|
|
@@ -13369,11 +13368,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13369
13368
|
* listener is removed from the Persister.
|
|
13370
13369
|
*
|
|
13371
13370
|
* ```jsx
|
|
13372
|
-
* import {Provider, usePersisterStatusListener} from 'tinybase/ui-react';
|
|
13373
13371
|
* import React from 'react';
|
|
13374
13372
|
* import {createRoot} from 'react-dom/client';
|
|
13375
|
-
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13376
13373
|
* import {createStore} from 'tinybase';
|
|
13374
|
+
* import {createSessionPersister} from 'tinybase/persisters/persister-browser';
|
|
13375
|
+
* import {Provider, usePersisterStatusListener} from 'tinybase/ui-react';
|
|
13377
13376
|
*
|
|
13378
13377
|
* const App = ({persister}) => (
|
|
13379
13378
|
* <Provider persister={persister}>
|
|
@@ -13467,15 +13466,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13467
13466
|
* only occurs once by default.
|
|
13468
13467
|
*
|
|
13469
13468
|
* ```jsx
|
|
13469
|
+
* import React from 'react';
|
|
13470
|
+
* import {createRoot} from 'react-dom/client';
|
|
13471
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13472
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13470
13473
|
* import {
|
|
13471
13474
|
* useCreateMergeableStore,
|
|
13472
13475
|
* useCreateSynchronizer,
|
|
13473
13476
|
* useTables,
|
|
13474
13477
|
* } from 'tinybase/ui-react';
|
|
13475
|
-
* import React from 'react';
|
|
13476
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13477
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13478
|
-
* import {createRoot} from 'react-dom/client';
|
|
13479
13478
|
*
|
|
13480
13479
|
* const App = () => {
|
|
13481
13480
|
* const store = useCreateMergeableStore(() => createMergeableStore('s1'));
|
|
@@ -13506,17 +13505,17 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13506
13505
|
* is provided to start both Synchronizers' synchronization.
|
|
13507
13506
|
*
|
|
13508
13507
|
* ```jsx
|
|
13508
|
+
* import React from 'react';
|
|
13509
|
+
* import {createRoot} from 'react-dom/client';
|
|
13510
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13511
|
+
* import {createWsSynchronizer} from 'tinybase/synchronizers/synchronizer-ws-client';
|
|
13512
|
+
* import {createWsServer} from 'tinybase/synchronizers/synchronizer-ws-server';
|
|
13509
13513
|
* import {
|
|
13510
13514
|
* useCreateMergeableStore,
|
|
13511
13515
|
* useCreateSynchronizer,
|
|
13512
13516
|
* useTables,
|
|
13513
13517
|
* } from 'tinybase/ui-react';
|
|
13514
|
-
* import React from 'react';
|
|
13515
13518
|
* import {WebSocketServer} from 'ws';
|
|
13516
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13517
|
-
* import {createRoot} from 'react-dom/client';
|
|
13518
|
-
* import {createWsServer} from 'tinybase/synchronizers/synchronizer-ws-server';
|
|
13519
|
-
* import {createWsSynchronizer} from 'tinybase/synchronizers/synchronizer-ws-client';
|
|
13520
13519
|
*
|
|
13521
13520
|
* const server1 = createWsServer(new WebSocketServer({port: 8044}));
|
|
13522
13521
|
* const server2 = createWsServer(new WebSocketServer({port: 8045}));
|
|
@@ -13580,16 +13579,16 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13580
13579
|
* inner component accesses their Ids.
|
|
13581
13580
|
*
|
|
13582
13581
|
* ```jsx
|
|
13582
|
+
* import React from 'react';
|
|
13583
|
+
* import {createRoot} from 'react-dom/client';
|
|
13584
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13585
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13583
13586
|
* import {
|
|
13584
13587
|
* Provider,
|
|
13585
13588
|
* useCreateMergeableStore,
|
|
13586
13589
|
* useCreateSynchronizer,
|
|
13587
13590
|
* useSynchronizerIds,
|
|
13588
13591
|
* } from 'tinybase/ui-react';
|
|
13589
|
-
* import React from 'react';
|
|
13590
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13591
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13592
|
-
* import {createRoot} from 'react-dom/client';
|
|
13593
13592
|
*
|
|
13594
13593
|
* const App = () => {
|
|
13595
13594
|
* const store1 = useCreateMergeableStore(createMergeableStore);
|
|
@@ -13651,11 +13650,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13651
13650
|
* it passed as a prop.
|
|
13652
13651
|
*
|
|
13653
13652
|
* ```jsx
|
|
13654
|
-
* import {Provider, useSynchronizer} from 'tinybase/ui-react';
|
|
13655
13653
|
* import React from 'react';
|
|
13656
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13657
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13658
13654
|
* import {createRoot} from 'react-dom/client';
|
|
13655
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13656
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13657
|
+
* import {Provider, useSynchronizer} from 'tinybase/ui-react';
|
|
13659
13658
|
*
|
|
13660
13659
|
* const App = ({synchronizer}) => (
|
|
13661
13660
|
* <Provider synchronizer={synchronizer}>
|
|
@@ -13678,11 +13677,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13678
13677
|
* without the need to have it passed as a prop.
|
|
13679
13678
|
*
|
|
13680
13679
|
* ```jsx
|
|
13681
|
-
* import {Provider, useSynchronizer} from 'tinybase/ui-react';
|
|
13682
13680
|
* import React from 'react';
|
|
13683
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13684
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13685
13681
|
* import {createRoot} from 'react-dom/client';
|
|
13682
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13683
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13684
|
+
* import {Provider, useSynchronizer} from 'tinybase/ui-react';
|
|
13686
13685
|
*
|
|
13687
13686
|
* const App = ({synchronizer}) => (
|
|
13688
13687
|
* <Provider synchronizersById={{petSynchronizer: synchronizer}}>
|
|
@@ -13740,14 +13739,14 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13740
13739
|
* portable.
|
|
13741
13740
|
*
|
|
13742
13741
|
* ```jsx
|
|
13742
|
+
* import React from 'react';
|
|
13743
|
+
* import {createRoot} from 'react-dom/client';
|
|
13744
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13745
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13743
13746
|
* import {
|
|
13744
13747
|
* Provider,
|
|
13745
13748
|
* useSynchronizerOrSynchronizerById,
|
|
13746
13749
|
* } from 'tinybase/ui-react';
|
|
13747
|
-
* import React from 'react';
|
|
13748
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13749
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13750
|
-
* import {createRoot} from 'react-dom/client';
|
|
13751
13750
|
*
|
|
13752
13751
|
* const App = ({synchronizer}) => (
|
|
13753
13752
|
* <Provider synchronizer={synchronizer}>
|
|
@@ -13814,9 +13813,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13814
13813
|
*
|
|
13815
13814
|
* ```jsx
|
|
13816
13815
|
* import React from 'react';
|
|
13817
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13818
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13819
13816
|
* import {createRoot} from 'react-dom/client';
|
|
13817
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13818
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13820
13819
|
* import {useSynchronizerStatus} from 'tinybase/ui-react';
|
|
13821
13820
|
*
|
|
13822
13821
|
* const synchronizer = createLocalSynchronizer(createMergeableStore());
|
|
@@ -13833,11 +13832,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13833
13832
|
* provided. A component within it then uses the useSynchronizerStatus hook.
|
|
13834
13833
|
*
|
|
13835
13834
|
* ```jsx
|
|
13836
|
-
* import {Provider, useSynchronizerStatus} from 'tinybase/ui-react';
|
|
13837
13835
|
* import React from 'react';
|
|
13838
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13839
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13840
13836
|
* import {createRoot} from 'react-dom/client';
|
|
13837
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13838
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13839
|
+
* import {Provider, useSynchronizerStatus} from 'tinybase/ui-react';
|
|
13841
13840
|
*
|
|
13842
13841
|
* const App = ({synchronizer}) => (
|
|
13843
13842
|
* <Provider synchronizer={synchronizer}>
|
|
@@ -13858,11 +13857,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13858
13857
|
* useSynchronizerStatus hook.
|
|
13859
13858
|
*
|
|
13860
13859
|
* ```jsx
|
|
13861
|
-
* import {Provider, useSynchronizerStatus} from 'tinybase/ui-react';
|
|
13862
13860
|
* import React from 'react';
|
|
13863
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13864
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13865
13861
|
* import {createRoot} from 'react-dom/client';
|
|
13862
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13863
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13864
|
+
* import {Provider, useSynchronizerStatus} from 'tinybase/ui-react';
|
|
13866
13865
|
*
|
|
13867
13866
|
* const App = ({synchronizer}) => (
|
|
13868
13867
|
* <Provider synchronizersById={{petSynchronizer: synchronizer}}>
|
|
@@ -13921,11 +13920,11 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
13921
13920
|
* listener is removed from the Synchronizer.
|
|
13922
13921
|
*
|
|
13923
13922
|
* ```jsx
|
|
13924
|
-
* import {Provider, useSynchronizerStatusListener} from 'tinybase/ui-react';
|
|
13925
13923
|
* import React from 'react';
|
|
13926
|
-
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13927
|
-
* import {createMergeableStore} from 'tinybase';
|
|
13928
13924
|
* import {createRoot} from 'react-dom/client';
|
|
13925
|
+
* import {createMergeableStore} from 'tinybase';
|
|
13926
|
+
* import {createLocalSynchronizer} from 'tinybase/synchronizers/synchronizer-local';
|
|
13927
|
+
* import {Provider, useSynchronizerStatusListener} from 'tinybase/ui-react';
|
|
13929
13928
|
*
|
|
13930
13929
|
* const App = ({synchronizer}) => (
|
|
13931
13930
|
* <Provider synchronizer={synchronizer}>
|
|
@@ -14198,10 +14197,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14198
14197
|
* props.
|
|
14199
14198
|
*
|
|
14200
14199
|
* ```jsx
|
|
14201
|
-
* import {CellView, Provider, useMetric} from 'tinybase/ui-react';
|
|
14202
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
14203
14200
|
* import React from 'react';
|
|
14204
14201
|
* import {createRoot} from 'react-dom/client';
|
|
14202
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
14203
|
+
* import {CellView, Provider, useMetric} from 'tinybase/ui-react';
|
|
14205
14204
|
*
|
|
14206
14205
|
* const App = ({store, metrics}) => (
|
|
14207
14206
|
* <Provider store={store} metricsById={{petStore: metrics}}>
|
|
@@ -14232,15 +14231,15 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14232
14231
|
* objects are provided, showing how visibility is merged.
|
|
14233
14232
|
*
|
|
14234
14233
|
* ```jsx
|
|
14234
|
+
* import React from 'react';
|
|
14235
|
+
* import {createRoot} from 'react-dom/client';
|
|
14236
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
14235
14237
|
* import {
|
|
14236
14238
|
* CellView,
|
|
14237
14239
|
* Provider,
|
|
14238
14240
|
* useCreateStore,
|
|
14239
14241
|
* useMetric,
|
|
14240
14242
|
* } from 'tinybase/ui-react';
|
|
14241
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
14242
|
-
* import React from 'react';
|
|
14243
|
-
* import {createRoot} from 'react-dom/client';
|
|
14244
14243
|
*
|
|
14245
14244
|
* const App = ({petStore, metrics}) => (
|
|
14246
14245
|
* <Provider storesById={{pet: petStore}} metrics={metrics}>
|
|
@@ -14318,10 +14317,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14318
14317
|
* the component.
|
|
14319
14318
|
*
|
|
14320
14319
|
* ```jsx
|
|
14321
|
-
* import {CellView} from 'tinybase/ui-react';
|
|
14322
14320
|
* import React from 'react';
|
|
14323
14321
|
* import {createRoot} from 'react-dom/client';
|
|
14324
14322
|
* import {createStore} from 'tinybase';
|
|
14323
|
+
* import {CellView} from 'tinybase/ui-react';
|
|
14325
14324
|
*
|
|
14326
14325
|
* const store = createStore().setCell('pets', 'fido', 'color', 'brown');
|
|
14327
14326
|
* const App = () => (
|
|
@@ -14345,10 +14344,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14345
14344
|
* for readability).
|
|
14346
14345
|
*
|
|
14347
14346
|
* ```jsx
|
|
14348
|
-
* import {CellView, Provider} from 'tinybase/ui-react';
|
|
14349
14347
|
* import React from 'react';
|
|
14350
14348
|
* import {createRoot} from 'react-dom/client';
|
|
14351
14349
|
* import {createStore} from 'tinybase';
|
|
14350
|
+
* import {CellView, Provider} from 'tinybase/ui-react';
|
|
14352
14351
|
*
|
|
14353
14352
|
* const App = ({store}) => (
|
|
14354
14353
|
* <Provider store={store}>
|
|
@@ -14373,10 +14372,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14373
14372
|
* non-existent Cell.
|
|
14374
14373
|
*
|
|
14375
14374
|
* ```jsx
|
|
14376
|
-
* import {CellView, Provider} from 'tinybase/ui-react';
|
|
14377
14375
|
* import React from 'react';
|
|
14378
14376
|
* import {createRoot} from 'react-dom/client';
|
|
14379
14377
|
* import {createStore} from 'tinybase';
|
|
14378
|
+
* import {CellView, Provider} from 'tinybase/ui-react';
|
|
14380
14379
|
*
|
|
14381
14380
|
* const App = ({store}) => (
|
|
14382
14381
|
* <Provider store={store}>
|
|
@@ -14438,9 +14437,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14438
14437
|
*
|
|
14439
14438
|
* ```jsx
|
|
14440
14439
|
* import React from 'react';
|
|
14441
|
-
* import {RowView} from 'tinybase/ui-react';
|
|
14442
14440
|
* import {createRoot} from 'react-dom/client';
|
|
14443
14441
|
* import {createStore} from 'tinybase';
|
|
14442
|
+
* import {RowView} from 'tinybase/ui-react';
|
|
14444
14443
|
*
|
|
14445
14444
|
* const store = createStore().setRow('pets', 'fido', {species: 'dog'});
|
|
14446
14445
|
* const App = () => (
|
|
@@ -14464,10 +14463,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14464
14463
|
* set of Cell Ids (and rendered with Ids for readability).
|
|
14465
14464
|
*
|
|
14466
14465
|
* ```jsx
|
|
14467
|
-
* import {Provider, RowView} from 'tinybase/ui-react';
|
|
14468
14466
|
* import React from 'react';
|
|
14469
14467
|
* import {createRoot} from 'react-dom/client';
|
|
14470
14468
|
* import {createStore} from 'tinybase';
|
|
14469
|
+
* import {Provider, RowView} from 'tinybase/ui-react';
|
|
14471
14470
|
*
|
|
14472
14471
|
* const App = ({store}) => (
|
|
14473
14472
|
* <Provider store={store}>
|
|
@@ -14502,10 +14501,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14502
14501
|
* Cell component and a custom props callback.
|
|
14503
14502
|
*
|
|
14504
14503
|
* ```jsx
|
|
14505
|
-
* import {CellView, Provider, RowView} from 'tinybase/ui-react';
|
|
14506
14504
|
* import React from 'react';
|
|
14507
14505
|
* import {createRoot} from 'react-dom/client';
|
|
14508
14506
|
* import {createStore} from 'tinybase';
|
|
14507
|
+
* import {CellView, Provider, RowView} from 'tinybase/ui-react';
|
|
14509
14508
|
*
|
|
14510
14509
|
* const App = ({store}) => (
|
|
14511
14510
|
* <Provider store={store}>
|
|
@@ -14585,9 +14584,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14585
14584
|
*
|
|
14586
14585
|
* ```jsx
|
|
14587
14586
|
* import React from 'react';
|
|
14588
|
-
* import {SortedTableView} from 'tinybase/ui-react';
|
|
14589
14587
|
* import {createRoot} from 'react-dom/client';
|
|
14590
14588
|
* import {createStore} from 'tinybase';
|
|
14589
|
+
* import {SortedTableView} from 'tinybase/ui-react';
|
|
14591
14590
|
*
|
|
14592
14591
|
* const store = createStore().setTables({
|
|
14593
14592
|
* pets: {
|
|
@@ -14621,10 +14620,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14621
14620
|
* a custom set of Cell Ids (and rendered with Ids for readability).
|
|
14622
14621
|
*
|
|
14623
14622
|
* ```jsx
|
|
14624
|
-
* import {Provider, SortedTableView} from 'tinybase/ui-react';
|
|
14625
14623
|
* import React from 'react';
|
|
14626
14624
|
* import {createRoot} from 'react-dom/client';
|
|
14627
14625
|
* import {createStore} from 'tinybase';
|
|
14626
|
+
* import {Provider, SortedTableView} from 'tinybase/ui-react';
|
|
14628
14627
|
*
|
|
14629
14628
|
* const App = ({store}) => (
|
|
14630
14629
|
* <Provider store={store}>
|
|
@@ -14660,10 +14659,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14660
14659
|
* a custom Row component and a custom props callback.
|
|
14661
14660
|
*
|
|
14662
14661
|
* ```jsx
|
|
14663
|
-
* import {Provider, RowView, SortedTableView} from 'tinybase/ui-react';
|
|
14664
14662
|
* import React from 'react';
|
|
14665
14663
|
* import {createRoot} from 'react-dom/client';
|
|
14666
14664
|
* import {createStore} from 'tinybase';
|
|
14665
|
+
* import {Provider, RowView, SortedTableView} from 'tinybase/ui-react';
|
|
14667
14666
|
*
|
|
14668
14667
|
* const App = ({store}) => (
|
|
14669
14668
|
* <Provider store={store}>
|
|
@@ -14743,9 +14742,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14743
14742
|
*
|
|
14744
14743
|
* ```jsx
|
|
14745
14744
|
* import React from 'react';
|
|
14746
|
-
* import {TableView} from 'tinybase/ui-react';
|
|
14747
14745
|
* import {createRoot} from 'react-dom/client';
|
|
14748
14746
|
* import {createStore} from 'tinybase';
|
|
14747
|
+
* import {TableView} from 'tinybase/ui-react';
|
|
14749
14748
|
*
|
|
14750
14749
|
* const store = createStore().setTable('pets', {fido: {species: 'dog'}});
|
|
14751
14750
|
* const App = () => (
|
|
@@ -14769,10 +14768,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14769
14768
|
* custom set of Cell Ids (and rendered with Ids for readability).
|
|
14770
14769
|
*
|
|
14771
14770
|
* ```jsx
|
|
14772
|
-
* import {Provider, TableView} from 'tinybase/ui-react';
|
|
14773
14771
|
* import React from 'react';
|
|
14774
14772
|
* import {createRoot} from 'react-dom/client';
|
|
14775
14773
|
* import {createStore} from 'tinybase';
|
|
14774
|
+
* import {Provider, TableView} from 'tinybase/ui-react';
|
|
14776
14775
|
*
|
|
14777
14776
|
* const App = ({store}) => (
|
|
14778
14777
|
* <Provider store={store}>
|
|
@@ -14805,10 +14804,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14805
14804
|
* custom Row component and a custom props callback.
|
|
14806
14805
|
*
|
|
14807
14806
|
* ```jsx
|
|
14808
|
-
* import {Provider, RowView, TableView} from 'tinybase/ui-react';
|
|
14809
14807
|
* import React from 'react';
|
|
14810
14808
|
* import {createRoot} from 'react-dom/client';
|
|
14811
14809
|
* import {createStore} from 'tinybase';
|
|
14810
|
+
* import {Provider, RowView, TableView} from 'tinybase/ui-react';
|
|
14812
14811
|
*
|
|
14813
14812
|
* const App = ({store}) => (
|
|
14814
14813
|
* <Provider store={store}>
|
|
@@ -14879,9 +14878,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14879
14878
|
*
|
|
14880
14879
|
* ```jsx
|
|
14881
14880
|
* import React from 'react';
|
|
14882
|
-
* import {TablesView} from 'tinybase/ui-react';
|
|
14883
14881
|
* import {createRoot} from 'react-dom/client';
|
|
14884
14882
|
* import {createStore} from 'tinybase';
|
|
14883
|
+
* import {TablesView} from 'tinybase/ui-react';
|
|
14885
14884
|
*
|
|
14886
14885
|
* const store = createStore().setTables({pets: {fido: {species: 'dog'}}});
|
|
14887
14886
|
* const App = () => (
|
|
@@ -14905,10 +14904,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14905
14904
|
* for readability).
|
|
14906
14905
|
*
|
|
14907
14906
|
* ```jsx
|
|
14908
|
-
* import {Provider, TablesView} from 'tinybase/ui-react';
|
|
14909
14907
|
* import React from 'react';
|
|
14910
14908
|
* import {createRoot} from 'react-dom/client';
|
|
14911
14909
|
* import {createStore} from 'tinybase';
|
|
14910
|
+
* import {Provider, TablesView} from 'tinybase/ui-react';
|
|
14912
14911
|
*
|
|
14913
14912
|
* const App = ({store}) => (
|
|
14914
14913
|
* <Provider store={store}>
|
|
@@ -14936,10 +14935,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
14936
14935
|
* custom Table component and a custom props callback.
|
|
14937
14936
|
*
|
|
14938
14937
|
* ```jsx
|
|
14939
|
-
* import {Provider, TableView, TablesView} from 'tinybase/ui-react';
|
|
14940
14938
|
* import React from 'react';
|
|
14941
14939
|
* import {createRoot} from 'react-dom/client';
|
|
14942
14940
|
* import {createStore} from 'tinybase';
|
|
14941
|
+
* import {Provider, TableView, TablesView} from 'tinybase/ui-react';
|
|
14943
14942
|
*
|
|
14944
14943
|
* const App = ({store}) => (
|
|
14945
14944
|
* <Provider store={store}>
|
|
@@ -15007,9 +15006,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15007
15006
|
*
|
|
15008
15007
|
* ```jsx
|
|
15009
15008
|
* import React from 'react';
|
|
15010
|
-
* import {ValueView} from 'tinybase/ui-react';
|
|
15011
15009
|
* import {createRoot} from 'react-dom/client';
|
|
15012
15010
|
* import {createStore} from 'tinybase';
|
|
15011
|
+
* import {ValueView} from 'tinybase/ui-react';
|
|
15013
15012
|
*
|
|
15014
15013
|
* const store = createStore().setValue('open', true);
|
|
15015
15014
|
* const App = () => (
|
|
@@ -15033,10 +15032,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15033
15032
|
* Id for readability).
|
|
15034
15033
|
*
|
|
15035
15034
|
* ```jsx
|
|
15036
|
-
* import {Provider, ValueView} from 'tinybase/ui-react';
|
|
15037
15035
|
* import React from 'react';
|
|
15038
15036
|
* import {createRoot} from 'react-dom/client';
|
|
15039
15037
|
* import {createStore} from 'tinybase';
|
|
15038
|
+
* import {Provider, ValueView} from 'tinybase/ui-react';
|
|
15040
15039
|
*
|
|
15041
15040
|
* const App = ({store}) => (
|
|
15042
15041
|
* <Provider store={store}>
|
|
@@ -15061,10 +15060,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15061
15060
|
* non-existent Value.
|
|
15062
15061
|
*
|
|
15063
15062
|
* ```jsx
|
|
15064
|
-
* import {Provider, ValueView} from 'tinybase/ui-react';
|
|
15065
15063
|
* import React from 'react';
|
|
15066
15064
|
* import {createRoot} from 'react-dom/client';
|
|
15067
15065
|
* import {createStore} from 'tinybase';
|
|
15066
|
+
* import {Provider, ValueView} from 'tinybase/ui-react';
|
|
15068
15067
|
*
|
|
15069
15068
|
* const App = ({store}) => (
|
|
15070
15069
|
* <Provider store={store}>
|
|
@@ -15123,9 +15122,9 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15123
15122
|
*
|
|
15124
15123
|
* ```jsx
|
|
15125
15124
|
* import React from 'react';
|
|
15126
|
-
* import {ValuesView} from 'tinybase/ui-react';
|
|
15127
15125
|
* import {createRoot} from 'react-dom/client';
|
|
15128
15126
|
* import {createStore} from 'tinybase';
|
|
15127
|
+
* import {ValuesView} from 'tinybase/ui-react';
|
|
15129
15128
|
*
|
|
15130
15129
|
* const store = createStore().setValue('open', true);
|
|
15131
15130
|
* const App = () => (
|
|
@@ -15149,10 +15148,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15149
15148
|
* Ids for readability).
|
|
15150
15149
|
*
|
|
15151
15150
|
* ```jsx
|
|
15152
|
-
* import {Provider, ValuesView} from 'tinybase/ui-react';
|
|
15153
15151
|
* import React from 'react';
|
|
15154
15152
|
* import {createRoot} from 'react-dom/client';
|
|
15155
15153
|
* import {createStore} from 'tinybase';
|
|
15154
|
+
* import {Provider, ValuesView} from 'tinybase/ui-react';
|
|
15156
15155
|
*
|
|
15157
15156
|
* const App = ({store}) => (
|
|
15158
15157
|
* <Provider store={store}>
|
|
@@ -15177,10 +15176,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15177
15176
|
* custom Value component and a custom props callback.
|
|
15178
15177
|
*
|
|
15179
15178
|
* ```jsx
|
|
15180
|
-
* import {Provider, ValueView, ValuesView} from 'tinybase/ui-react';
|
|
15181
15179
|
* import React from 'react';
|
|
15182
15180
|
* import {createRoot} from 'react-dom/client';
|
|
15183
15181
|
* import {createStore} from 'tinybase';
|
|
15182
|
+
* import {Provider, ValueView, ValuesView} from 'tinybase/ui-react';
|
|
15184
15183
|
*
|
|
15185
15184
|
* const App = ({store}) => (
|
|
15186
15185
|
* <Provider store={store}>
|
|
@@ -15239,10 +15238,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15239
15238
|
* re-renders the component.
|
|
15240
15239
|
*
|
|
15241
15240
|
* ```jsx
|
|
15242
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
15243
|
-
* import {MetricView} from 'tinybase/ui-react';
|
|
15244
15241
|
* import React from 'react';
|
|
15245
15242
|
* import {createRoot} from 'react-dom/client';
|
|
15243
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
15244
|
+
* import {MetricView} from 'tinybase/ui-react';
|
|
15246
15245
|
*
|
|
15247
15246
|
* const store = createStore().setTable('species', {
|
|
15248
15247
|
* dog: {price: 5},
|
|
@@ -15272,10 +15271,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15272
15271
|
* its Id for readability).
|
|
15273
15272
|
*
|
|
15274
15273
|
* ```jsx
|
|
15275
|
-
* import {MetricView, Provider} from 'tinybase/ui-react';
|
|
15276
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
15277
15274
|
* import React from 'react';
|
|
15278
15275
|
* import {createRoot} from 'react-dom/client';
|
|
15276
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
15277
|
+
* import {MetricView, Provider} from 'tinybase/ui-react';
|
|
15279
15278
|
*
|
|
15280
15279
|
* const App = ({metrics}) => (
|
|
15281
15280
|
* <Provider metrics={metrics}>
|
|
@@ -15307,10 +15306,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15307
15306
|
* non-existent Metric.
|
|
15308
15307
|
*
|
|
15309
15308
|
* ```jsx
|
|
15310
|
-
* import {MetricView, Provider} from 'tinybase/ui-react';
|
|
15311
|
-
* import {createMetrics, createStore} from 'tinybase';
|
|
15312
15309
|
* import React from 'react';
|
|
15313
15310
|
* import {createRoot} from 'react-dom/client';
|
|
15311
|
+
* import {createMetrics, createStore} from 'tinybase';
|
|
15312
|
+
* import {MetricView, Provider} from 'tinybase/ui-react';
|
|
15314
15313
|
*
|
|
15315
15314
|
* const App = ({metrics}) => (
|
|
15316
15315
|
* <Provider metrics={metrics}>
|
|
@@ -15371,10 +15370,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15371
15370
|
* the component.
|
|
15372
15371
|
*
|
|
15373
15372
|
* ```jsx
|
|
15374
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15375
15373
|
* import React from 'react';
|
|
15376
|
-
* import {SliceView} from 'tinybase/ui-react';
|
|
15377
15374
|
* import {createRoot} from 'react-dom/client';
|
|
15375
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15376
|
+
* import {SliceView} from 'tinybase/ui-react';
|
|
15378
15377
|
*
|
|
15379
15378
|
* const store = createStore().setTable('pets', {
|
|
15380
15379
|
* fido: {species: 'dog'},
|
|
@@ -15408,10 +15407,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15408
15407
|
* Ids for readability).
|
|
15409
15408
|
*
|
|
15410
15409
|
* ```jsx
|
|
15411
|
-
* import {Provider, SliceView} from 'tinybase/ui-react';
|
|
15412
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15413
15410
|
* import React from 'react';
|
|
15414
15411
|
* import {createRoot} from 'react-dom/client';
|
|
15412
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15413
|
+
* import {Provider, SliceView} from 'tinybase/ui-react';
|
|
15415
15414
|
*
|
|
15416
15415
|
* const App = ({indexes}) => (
|
|
15417
15416
|
* <Provider indexes={indexes}>
|
|
@@ -15443,10 +15442,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15443
15442
|
* custom Row component and a custom props callback.
|
|
15444
15443
|
*
|
|
15445
15444
|
* ```jsx
|
|
15446
|
-
* import {Provider, RowView, SliceView} from 'tinybase/ui-react';
|
|
15447
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15448
15445
|
* import React from 'react';
|
|
15449
15446
|
* import {createRoot} from 'react-dom/client';
|
|
15447
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15448
|
+
* import {Provider, RowView, SliceView} from 'tinybase/ui-react';
|
|
15450
15449
|
*
|
|
15451
15450
|
* const App = ({indexes}) => (
|
|
15452
15451
|
* <Provider indexes={indexes}>
|
|
@@ -15521,10 +15520,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15521
15520
|
* the component.
|
|
15522
15521
|
*
|
|
15523
15522
|
* ```jsx
|
|
15524
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15525
|
-
* import {IndexView} from 'tinybase/ui-react';
|
|
15526
15523
|
* import React from 'react';
|
|
15527
15524
|
* import {createRoot} from 'react-dom/client';
|
|
15525
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15526
|
+
* import {IndexView} from 'tinybase/ui-react';
|
|
15528
15527
|
*
|
|
15529
15528
|
* const store = createStore().setTable('pets', {
|
|
15530
15529
|
* fido: {species: 'dog'},
|
|
@@ -15553,10 +15552,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15553
15552
|
* Ids for readability).
|
|
15554
15553
|
*
|
|
15555
15554
|
* ```jsx
|
|
15556
|
-
* import {IndexView, Provider} from 'tinybase/ui-react';
|
|
15557
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15558
15555
|
* import React from 'react';
|
|
15559
15556
|
* import {createRoot} from 'react-dom/client';
|
|
15557
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15558
|
+
* import {IndexView, Provider} from 'tinybase/ui-react';
|
|
15560
15559
|
*
|
|
15561
15560
|
* const App = ({indexes}) => (
|
|
15562
15561
|
* <Provider indexes={indexes}>
|
|
@@ -15587,10 +15586,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15587
15586
|
* custom Slice component and a custom props callback.
|
|
15588
15587
|
*
|
|
15589
15588
|
* ```jsx
|
|
15590
|
-
* import {IndexView, Provider, SliceView} from 'tinybase/ui-react';
|
|
15591
|
-
* import {createIndexes, createStore} from 'tinybase';
|
|
15592
15589
|
* import React from 'react';
|
|
15593
15590
|
* import {createRoot} from 'react-dom/client';
|
|
15591
|
+
* import {createIndexes, createStore} from 'tinybase';
|
|
15592
|
+
* import {IndexView, Provider, SliceView} from 'tinybase/ui-react';
|
|
15594
15593
|
*
|
|
15595
15594
|
* const App = ({indexes}) => (
|
|
15596
15595
|
* <Provider indexes={indexes}>
|
|
@@ -15666,10 +15665,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15666
15665
|
* re-renders the component.
|
|
15667
15666
|
*
|
|
15668
15667
|
* ```jsx
|
|
15669
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15670
15668
|
* import React from 'react';
|
|
15671
|
-
* import {RemoteRowView} from 'tinybase/ui-react';
|
|
15672
15669
|
* import {createRoot} from 'react-dom/client';
|
|
15670
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15671
|
+
* import {RemoteRowView} from 'tinybase/ui-react';
|
|
15673
15672
|
*
|
|
15674
15673
|
* const store = createStore()
|
|
15675
15674
|
* .setTable('pets', {fido: {species: 'dog'}, cujo: {species: 'dog'}})
|
|
@@ -15705,10 +15704,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15705
15704
|
* remote Row (with Ids for readability).
|
|
15706
15705
|
*
|
|
15707
15706
|
* ```jsx
|
|
15708
|
-
* import {Provider, RemoteRowView} from 'tinybase/ui-react';
|
|
15709
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15710
15707
|
* import React from 'react';
|
|
15711
15708
|
* import {createRoot} from 'react-dom/client';
|
|
15709
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15710
|
+
* import {Provider, RemoteRowView} from 'tinybase/ui-react';
|
|
15712
15711
|
*
|
|
15713
15712
|
* const App = ({relationships}) => (
|
|
15714
15713
|
* <Provider relationships={relationships}>
|
|
@@ -15743,10 +15742,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15743
15742
|
* remote Row with a custom Row component and a custom props callback.
|
|
15744
15743
|
*
|
|
15745
15744
|
* ```jsx
|
|
15746
|
-
* import {Provider, RemoteRowView, RowView} from 'tinybase/ui-react';
|
|
15747
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15748
15745
|
* import React from 'react';
|
|
15749
15746
|
* import {createRoot} from 'react-dom/client';
|
|
15747
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15748
|
+
* import {Provider, RemoteRowView, RowView} from 'tinybase/ui-react';
|
|
15750
15749
|
*
|
|
15751
15750
|
* const App = ({relationships}) => (
|
|
15752
15751
|
* <Provider relationships={relationships}>
|
|
@@ -15822,10 +15821,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15822
15821
|
* re-renders the component.
|
|
15823
15822
|
*
|
|
15824
15823
|
* ```jsx
|
|
15825
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15826
|
-
* import {LocalRowsView} from 'tinybase/ui-react';
|
|
15827
15824
|
* import React from 'react';
|
|
15828
15825
|
* import {createRoot} from 'react-dom/client';
|
|
15826
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15827
|
+
* import {LocalRowsView} from 'tinybase/ui-react';
|
|
15829
15828
|
*
|
|
15830
15829
|
* const store = createStore()
|
|
15831
15830
|
* .setTable('pets', {fido: {species: 'dog'}, cujo: {species: 'dog'}})
|
|
@@ -15862,10 +15861,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15862
15861
|
* local Row objects (with Ids for readability).
|
|
15863
15862
|
*
|
|
15864
15863
|
* ```jsx
|
|
15865
|
-
* import {LocalRowsView, Provider} from 'tinybase/ui-react';
|
|
15866
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15867
15864
|
* import React from 'react';
|
|
15868
15865
|
* import {createRoot} from 'react-dom/client';
|
|
15866
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15867
|
+
* import {LocalRowsView, Provider} from 'tinybase/ui-react';
|
|
15869
15868
|
*
|
|
15870
15869
|
* const App = ({relationships}) => (
|
|
15871
15870
|
* <Provider relationships={relationships}>
|
|
@@ -15900,10 +15899,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15900
15899
|
* local Row objects with a custom Row component and a custom props callback.
|
|
15901
15900
|
*
|
|
15902
15901
|
* ```jsx
|
|
15903
|
-
* import {LocalRowsView, Provider, RowView} from 'tinybase/ui-react';
|
|
15904
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15905
15902
|
* import React from 'react';
|
|
15906
15903
|
* import {createRoot} from 'react-dom/client';
|
|
15904
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15905
|
+
* import {LocalRowsView, Provider, RowView} from 'tinybase/ui-react';
|
|
15907
15906
|
*
|
|
15908
15907
|
* const App = ({relationships}) => (
|
|
15909
15908
|
* <Provider relationships={relationships}>
|
|
@@ -15979,10 +15978,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
15979
15978
|
* re-renders the component.
|
|
15980
15979
|
*
|
|
15981
15980
|
* ```jsx
|
|
15982
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
15983
|
-
* import {LinkedRowsView} from 'tinybase/ui-react';
|
|
15984
15981
|
* import React from 'react';
|
|
15985
15982
|
* import {createRoot} from 'react-dom/client';
|
|
15983
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
15984
|
+
* import {LinkedRowsView} from 'tinybase/ui-react';
|
|
15986
15985
|
*
|
|
15987
15986
|
* const store = createStore().setTable('pets', {
|
|
15988
15987
|
* fido: {next: 'felix'},
|
|
@@ -16022,10 +16021,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16022
16021
|
* local Row objects (with Ids for readability).
|
|
16023
16022
|
*
|
|
16024
16023
|
* ```jsx
|
|
16025
|
-
* import {LinkedRowsView, Provider} from 'tinybase/ui-react';
|
|
16026
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
16027
16024
|
* import React from 'react';
|
|
16028
16025
|
* import {createRoot} from 'react-dom/client';
|
|
16026
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
16027
|
+
* import {LinkedRowsView, Provider} from 'tinybase/ui-react';
|
|
16029
16028
|
*
|
|
16030
16029
|
* const App = ({relationships}) => (
|
|
16031
16030
|
* <Provider relationships={relationships}>
|
|
@@ -16061,10 +16060,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16061
16060
|
* local Row objects with a custom Row component and a custom props callback.
|
|
16062
16061
|
*
|
|
16063
16062
|
* ```jsx
|
|
16064
|
-
* import {LinkedRowsView, Provider, RowView} from 'tinybase/ui-react';
|
|
16065
|
-
* import {createRelationships, createStore} from 'tinybase';
|
|
16066
16063
|
* import React from 'react';
|
|
16067
16064
|
* import {createRoot} from 'react-dom/client';
|
|
16065
|
+
* import {createRelationships, createStore} from 'tinybase';
|
|
16066
|
+
* import {LinkedRowsView, Provider, RowView} from 'tinybase/ui-react';
|
|
16068
16067
|
*
|
|
16069
16068
|
* const App = ({relationships}) => (
|
|
16070
16069
|
* <Provider relationships={relationships}>
|
|
@@ -16138,10 +16137,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16138
16137
|
* Store re-renders the component.
|
|
16139
16138
|
*
|
|
16140
16139
|
* ```jsx
|
|
16141
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16142
16140
|
* import React from 'react';
|
|
16143
|
-
* import {ResultCellView} from 'tinybase/ui-react';
|
|
16144
16141
|
* import {createRoot} from 'react-dom/client';
|
|
16142
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16143
|
+
* import {ResultCellView} from 'tinybase/ui-react';
|
|
16145
16144
|
*
|
|
16146
16145
|
* const store = createStore().setTable('pets', {
|
|
16147
16146
|
* fido: {species: 'dog', color: 'brown'},
|
|
@@ -16179,10 +16178,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16179
16178
|
* (with its Id for readability).
|
|
16180
16179
|
*
|
|
16181
16180
|
* ```jsx
|
|
16182
|
-
* import {Provider, ResultCellView} from 'tinybase/ui-react';
|
|
16183
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16184
16181
|
* import React from 'react';
|
|
16185
16182
|
* import {createRoot} from 'react-dom/client';
|
|
16183
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16184
|
+
* import {Provider, ResultCellView} from 'tinybase/ui-react';
|
|
16186
16185
|
*
|
|
16187
16186
|
* const App = ({queries}) => (
|
|
16188
16187
|
* <Provider queries={queries}>
|
|
@@ -16218,10 +16217,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16218
16217
|
* non-existent Cell.
|
|
16219
16218
|
*
|
|
16220
16219
|
* ```jsx
|
|
16221
|
-
* import {Provider, ResultCellView} from 'tinybase/ui-react';
|
|
16222
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16223
16220
|
* import React from 'react';
|
|
16224
16221
|
* import {createRoot} from 'react-dom/client';
|
|
16222
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16223
|
+
* import {Provider, ResultCellView} from 'tinybase/ui-react';
|
|
16225
16224
|
*
|
|
16226
16225
|
* const App = ({queries}) => (
|
|
16227
16226
|
* <Provider queries={queries}>
|
|
@@ -16287,10 +16286,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16287
16286
|
* Store re-renders the component.
|
|
16288
16287
|
*
|
|
16289
16288
|
* ```jsx
|
|
16290
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16291
16289
|
* import React from 'react';
|
|
16292
|
-
* import {ResultRowView} from 'tinybase/ui-react';
|
|
16293
16290
|
* import {createRoot} from 'react-dom/client';
|
|
16291
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16292
|
+
* import {ResultRowView} from 'tinybase/ui-react';
|
|
16294
16293
|
*
|
|
16295
16294
|
* const store = createStore().setTable('pets', {
|
|
16296
16295
|
* fido: {species: 'dog', color: 'brown'},
|
|
@@ -16331,10 +16330,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16331
16330
|
* Ids for readability).
|
|
16332
16331
|
*
|
|
16333
16332
|
* ```jsx
|
|
16334
|
-
* import {Provider, ResultRowView} from 'tinybase/ui-react';
|
|
16335
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16336
16333
|
* import React from 'react';
|
|
16337
16334
|
* import {createRoot} from 'react-dom/client';
|
|
16335
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16336
|
+
* import {Provider, ResultRowView} from 'tinybase/ui-react';
|
|
16338
16337
|
*
|
|
16339
16338
|
* const App = ({queries}) => (
|
|
16340
16339
|
* <Provider queries={queries}>
|
|
@@ -16368,10 +16367,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16368
16367
|
* a custom Cell component and a custom props callback.
|
|
16369
16368
|
*
|
|
16370
16369
|
* ```jsx
|
|
16371
|
-
* import {Provider, ResultCellView, ResultRowView} from 'tinybase/ui-react';
|
|
16372
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16373
16370
|
* import React from 'react';
|
|
16374
16371
|
* import {createRoot} from 'react-dom/client';
|
|
16372
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16373
|
+
* import {Provider, ResultCellView, ResultRowView} from 'tinybase/ui-react';
|
|
16375
16374
|
*
|
|
16376
16375
|
* const App = ({queries}) => (
|
|
16377
16376
|
* <Provider queries={queries}>
|
|
@@ -16456,10 +16455,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16456
16455
|
* the Store re-renders the component.
|
|
16457
16456
|
*
|
|
16458
16457
|
* ```jsx
|
|
16459
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16460
16458
|
* import React from 'react';
|
|
16461
|
-
* import {ResultSortedTableView} from 'tinybase/ui-react';
|
|
16462
16459
|
* import {createRoot} from 'react-dom/client';
|
|
16460
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16461
|
+
* import {ResultSortedTableView} from 'tinybase/ui-react';
|
|
16463
16462
|
*
|
|
16464
16463
|
* const store = createStore().setTable('pets', {
|
|
16465
16464
|
* fido: {species: 'dog', color: 'brown'},
|
|
@@ -16496,10 +16495,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16496
16495
|
* Table (with Ids for readability).
|
|
16497
16496
|
*
|
|
16498
16497
|
* ```jsx
|
|
16499
|
-
* import {Provider, ResultSortedTableView} from 'tinybase/ui-react';
|
|
16500
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16501
16498
|
* import React from 'react';
|
|
16502
16499
|
* import {createRoot} from 'react-dom/client';
|
|
16500
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16501
|
+
* import {Provider, ResultSortedTableView} from 'tinybase/ui-react';
|
|
16503
16502
|
*
|
|
16504
16503
|
* const App = ({queries}) => (
|
|
16505
16504
|
* <Provider queries={queries}>
|
|
@@ -16533,14 +16532,14 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16533
16532
|
* Table with a custom Row component and a custom props callback.
|
|
16534
16533
|
*
|
|
16535
16534
|
* ```jsx
|
|
16535
|
+
* import React from 'react';
|
|
16536
|
+
* import {createRoot} from 'react-dom/client';
|
|
16537
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16536
16538
|
* import {
|
|
16537
16539
|
* Provider,
|
|
16538
16540
|
* ResultRowView,
|
|
16539
16541
|
* ResultSortedTableView,
|
|
16540
16542
|
* } from 'tinybase/ui-react';
|
|
16541
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16542
|
-
* import React from 'react';
|
|
16543
|
-
* import {createRoot} from 'react-dom/client';
|
|
16544
16543
|
*
|
|
16545
16544
|
* const App = ({queries}) => (
|
|
16546
16545
|
* <Provider queries={queries}>
|
|
@@ -16616,10 +16615,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16616
16615
|
* Store re-renders the component.
|
|
16617
16616
|
*
|
|
16618
16617
|
* ```jsx
|
|
16619
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16620
16618
|
* import React from 'react';
|
|
16621
|
-
* import {ResultTableView} from 'tinybase/ui-react';
|
|
16622
16619
|
* import {createRoot} from 'react-dom/client';
|
|
16620
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16621
|
+
* import {ResultTableView} from 'tinybase/ui-react';
|
|
16623
16622
|
*
|
|
16624
16623
|
* const store = createStore().setTable('pets', {
|
|
16625
16624
|
* fido: {species: 'dog', color: 'brown'},
|
|
@@ -16651,10 +16650,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16651
16650
|
* (with Ids for readability).
|
|
16652
16651
|
*
|
|
16653
16652
|
* ```jsx
|
|
16654
|
-
* import {Provider, ResultTableView} from 'tinybase/ui-react';
|
|
16655
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16656
16653
|
* import React from 'react';
|
|
16657
16654
|
* import {createRoot} from 'react-dom/client';
|
|
16655
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16656
|
+
* import {Provider, ResultTableView} from 'tinybase/ui-react';
|
|
16658
16657
|
*
|
|
16659
16658
|
* const App = ({queries}) => (
|
|
16660
16659
|
* <Provider queries={queries}>
|
|
@@ -16684,10 +16683,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16684
16683
|
* with a custom Row component and a custom props callback.
|
|
16685
16684
|
*
|
|
16686
16685
|
* ```jsx
|
|
16687
|
-
* import {Provider, ResultRowView, ResultTableView} from 'tinybase/ui-react';
|
|
16688
|
-
* import {createQueries, createStore} from 'tinybase';
|
|
16689
16686
|
* import React from 'react';
|
|
16690
16687
|
* import {createRoot} from 'react-dom/client';
|
|
16688
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
16689
|
+
* import {Provider, ResultRowView, ResultTableView} from 'tinybase/ui-react';
|
|
16691
16690
|
*
|
|
16692
16691
|
* const App = ({queries}) => (
|
|
16693
16692
|
* <Provider queries={queries}>
|
|
@@ -16754,10 +16753,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16754
16753
|
* a label (with its Id for readability).
|
|
16755
16754
|
*
|
|
16756
16755
|
* ```jsx
|
|
16757
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16758
|
-
* import {CheckpointView} from 'tinybase/ui-react';
|
|
16759
16756
|
* import React from 'react';
|
|
16760
16757
|
* import {createRoot} from 'react-dom/client';
|
|
16758
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16759
|
+
* import {CheckpointView} from 'tinybase/ui-react';
|
|
16761
16760
|
*
|
|
16762
16761
|
* const store = createStore().setTable('pets', {fido: {species: 'dog'}});
|
|
16763
16762
|
* const checkpoints = createCheckpoints(store);
|
|
@@ -16824,10 +16823,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16824
16823
|
* of previous checkpoints.
|
|
16825
16824
|
*
|
|
16826
16825
|
* ```jsx
|
|
16827
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16828
|
-
* import {BackwardCheckpointsView} from 'tinybase/ui-react';
|
|
16829
16826
|
* import React from 'react';
|
|
16830
16827
|
* import {createRoot} from 'react-dom/client';
|
|
16828
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16829
|
+
* import {BackwardCheckpointsView} from 'tinybase/ui-react';
|
|
16831
16830
|
*
|
|
16832
16831
|
* const store = createStore().setTable('pets', {fido: {color: 'brown'}});
|
|
16833
16832
|
* const checkpoints = createCheckpoints(store);
|
|
@@ -16859,10 +16858,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16859
16858
|
* renders the list of previous checkpoints (with Ids for readability).
|
|
16860
16859
|
*
|
|
16861
16860
|
* ```jsx
|
|
16862
|
-
* import {BackwardCheckpointsView, Provider} from 'tinybase/ui-react';
|
|
16863
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16864
16861
|
* import React from 'react';
|
|
16865
16862
|
* import {createRoot} from 'react-dom/client';
|
|
16863
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16864
|
+
* import {BackwardCheckpointsView, Provider} from 'tinybase/ui-react';
|
|
16866
16865
|
*
|
|
16867
16866
|
* const App = ({checkpoints}) => (
|
|
16868
16867
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -16897,14 +16896,14 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16897
16896
|
* custom props callback.
|
|
16898
16897
|
*
|
|
16899
16898
|
* ```jsx
|
|
16899
|
+
* import React from 'react';
|
|
16900
|
+
* import {createRoot} from 'react-dom/client';
|
|
16901
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16900
16902
|
* import {
|
|
16901
16903
|
* BackwardCheckpointsView,
|
|
16902
16904
|
* CheckpointView,
|
|
16903
16905
|
* Provider,
|
|
16904
16906
|
* } from 'tinybase/ui-react';
|
|
16905
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16906
|
-
* import React from 'react';
|
|
16907
|
-
* import {createRoot} from 'react-dom/client';
|
|
16908
16907
|
*
|
|
16909
16908
|
* const App = ({checkpoints}) => (
|
|
16910
16909
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -16986,10 +16985,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
16986
16985
|
* current checkpoints.
|
|
16987
16986
|
*
|
|
16988
16987
|
* ```jsx
|
|
16989
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16990
|
-
* import {CurrentCheckpointView} from 'tinybase/ui-react';
|
|
16991
16988
|
* import React from 'react';
|
|
16992
16989
|
* import {createRoot} from 'react-dom/client';
|
|
16990
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
16991
|
+
* import {CurrentCheckpointView} from 'tinybase/ui-react';
|
|
16993
16992
|
*
|
|
16994
16993
|
* const store = createStore().setTable('pets', {fido: {color: 'brown'}});
|
|
16995
16994
|
* const checkpoints = createCheckpoints(store);
|
|
@@ -17023,10 +17022,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
17023
17022
|
* renders current checkpoint (with its Id for readability).
|
|
17024
17023
|
*
|
|
17025
17024
|
* ```jsx
|
|
17026
|
-
* import {CurrentCheckpointView, Provider} from 'tinybase/ui-react';
|
|
17027
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17028
17025
|
* import React from 'react';
|
|
17029
17026
|
* import {createRoot} from 'react-dom/client';
|
|
17027
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17028
|
+
* import {CurrentCheckpointView, Provider} from 'tinybase/ui-react';
|
|
17030
17029
|
*
|
|
17031
17030
|
* const App = ({checkpoints}) => (
|
|
17032
17031
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -17058,14 +17057,14 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
17058
17057
|
* custom props callback.
|
|
17059
17058
|
*
|
|
17060
17059
|
* ```jsx
|
|
17060
|
+
* import React from 'react';
|
|
17061
|
+
* import {createRoot} from 'react-dom/client';
|
|
17062
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17061
17063
|
* import {
|
|
17062
17064
|
* CheckpointView,
|
|
17063
17065
|
* CurrentCheckpointView,
|
|
17064
17066
|
* Provider,
|
|
17065
17067
|
* } from 'tinybase/ui-react';
|
|
17066
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17067
|
-
* import React from 'react';
|
|
17068
|
-
* import {createRoot} from 'react-dom/client';
|
|
17069
17068
|
*
|
|
17070
17069
|
* const App = ({checkpoints}) => (
|
|
17071
17070
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -17150,10 +17149,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
17150
17149
|
* of future checkpoints.
|
|
17151
17150
|
*
|
|
17152
17151
|
* ```jsx
|
|
17153
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17154
|
-
* import {ForwardCheckpointsView} from 'tinybase/ui-react';
|
|
17155
17152
|
* import React from 'react';
|
|
17156
17153
|
* import {createRoot} from 'react-dom/client';
|
|
17154
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17155
|
+
* import {ForwardCheckpointsView} from 'tinybase/ui-react';
|
|
17157
17156
|
*
|
|
17158
17157
|
* const store = createStore().setTable('pets', {fido: {color: 'brown'}});
|
|
17159
17158
|
* const checkpoints = createCheckpoints(store);
|
|
@@ -17186,10 +17185,10 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
17186
17185
|
* renders the list of future checkpoints (with Ids for readability).
|
|
17187
17186
|
*
|
|
17188
17187
|
* ```jsx
|
|
17189
|
-
* import {ForwardCheckpointsView, Provider} from 'tinybase/ui-react';
|
|
17190
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17191
17188
|
* import React from 'react';
|
|
17192
17189
|
* import {createRoot} from 'react-dom/client';
|
|
17190
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17191
|
+
* import {ForwardCheckpointsView, Provider} from 'tinybase/ui-react';
|
|
17193
17192
|
*
|
|
17194
17193
|
* const App = ({checkpoints}) => (
|
|
17195
17194
|
* <Provider checkpoints={checkpoints}>
|
|
@@ -17224,14 +17223,14 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
17224
17223
|
* custom props callback.
|
|
17225
17224
|
*
|
|
17226
17225
|
* ```jsx
|
|
17226
|
+
* import React from 'react';
|
|
17227
|
+
* import {createRoot} from 'react-dom/client';
|
|
17228
|
+
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17227
17229
|
* import {
|
|
17228
17230
|
* CheckpointView,
|
|
17229
17231
|
* ForwardCheckpointsView,
|
|
17230
17232
|
* Provider,
|
|
17231
17233
|
* } from 'tinybase/ui-react';
|
|
17232
|
-
* import {createCheckpoints, createStore} from 'tinybase';
|
|
17233
|
-
* import React from 'react';
|
|
17234
|
-
* import {createRoot} from 'react-dom/client';
|
|
17235
17234
|
*
|
|
17236
17235
|
* const App = ({checkpoints}) => (
|
|
17237
17236
|
* <Provider checkpoints={checkpoints}>
|