From e3dc579460f7f97cea9a31e8a2c77b4d8ad515f5 Mon Sep 17 00:00:00 2001 From: Schalk Neethling Date: Wed, 15 Jun 2022 22:43:59 +0200 Subject: [PATCH] docs: small update to follow conventions (#1373) On https://pinia.vuejs.org/core-concepts/ it is mentioned that "Naming the returned function use... is a convention across composables to make its usage idiomatic.". In this example though, the returned function is called `todos` as opposed to `useTodos`. --- packages/docs/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/introduction.md b/packages/docs/introduction.md index 4899bee9..66d9b719 100644 --- a/packages/docs/introduction.md +++ b/packages/docs/introduction.md @@ -123,7 +123,7 @@ Here is a more complete example of the API you will be using with Pinia **with t ```js import { defineStore } from 'pinia' -export const todos = defineStore('todos', { +export const useTodos = defineStore('todos', { state: () => ({ /** @type {{ text: string, id: number, isFinished: boolean }[]} */ todos: [], -- 2.47.3