Skip to content

Commit 297133c

Browse files
committed
docs: add note about using provide for default store
1 parent 628456a commit 297133c

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

packages/private/docs/.vitepress/theme/components/VPSwitchStoreStyle.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const isDefaultStoreSelected = defineModel({
1919
:aria-checked="isDefaultStoreSelected"
2020
@click="isDefaultStoreSelected = !isDefaultStoreSelected"
2121
/>
22-
<span class="store-style-custom">Multiple</span>
22+
<span class="store-style-custom">Argument</span>
2323
</div>
2424
</div>
2525
</template>

packages/private/docs/api/checkpoints/composables.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Checkpoints composables.
44

5+
<div class="hide-custom-store">
6+
7+
> [!NOTE]
8+
> To use these composables with the "default" [Checkpoints](https://tinybase.org/api/checkpoints/interfaces/checkpoints/checkpoints/) object, you need to have the object provided with the [`provideCheckpoints`](/api/checkpoints/context#provide-checkpoints) function in a parent component. We recommend providing the store in the `createApp` call just like the `provideStore` is used in the [example in the guide](/guide/getting-started/connect-to-vuejs-app#provide-the-store-to-your-vue-app).
9+
10+
</div>
11+
512
## useCheckpoint {#use-checkpoint}
613

714
The `useCheckpoint` composable returns the label for a checkpoint, and registers a listener so that any changes to that result will cause a re-render.

packages/private/docs/api/store/composables.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Store's composables.
44

5+
<div class="hide-custom-store">
6+
7+
> [!NOTE]
8+
> To use these composables with the "default" store, you need to have the store provided with the [`provideStore`](/api/store/context#provide-store) function in a parent component. We recommend providing the store in the `createApp` call just like the [example in the guide](/guide/getting-started/connect-to-vuejs-app#provide-the-store-to-your-vue-app).
9+
10+
</div>
11+
512
## useCell {#use-cell}
613

714
The `useCell` composable returns a **readonly** reference to an object containing the value of a single [Cell](https://tinybase.org/api/store/type-aliases/store/cell/) in a given [Row](https://tinybase.org/api/store/type-aliases/store/row/), in a given [Table](https://tinybase.org/api/store/type-aliases/store/table/), and registers a listener so that any changes to that result will cause a re-render.

packages/private/docs/api/store/events.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Store's event hooks.
44

5+
<div class="hide-custom-store">
6+
7+
> [!NOTE]
8+
> To use these event hooks with the "default" store, you need to have the store provided with the [`provideStore`](/api/store/context#provide-store) function in a parent component. We recommend providing the store in the `createApp` call just like the [example in the guide](/guide/getting-started/connect-to-vuejs-app#provide-the-store-to-your-vue-app).
9+
10+
</div>
11+
512
## onCellChange {#on-cell-change}
613

714
The `onCellChange` event hook registers a listener function with a [Store](https://tinybase.org/api/store/interfaces/store/store/) that will be called whenever data in a [Cell](https://tinybase.org/api/store/type-aliases/store/cell/) changes.

packages/private/docs/api/store/references.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Store's references.
44

5+
<div class="hide-custom-store">
6+
7+
> [!NOTE]
8+
> To use these references with the "default" store, you need to have the store provided with the [`provideStore`](/api/store/context#provide-store) function in a parent component. We recommend providing the store in the `createApp` call just like the [example in the guide](/guide/getting-started/connect-to-vuejs-app#provide-the-store-to-your-vue-app).
9+
10+
</div>
11+
512
> [!IMPORTANT]
613
> The references are not deep-reactive, you have to assign a new value to the reference when you want to update the data.
714

0 commit comments

Comments
 (0)