From: Schalk Neethling Date: Wed, 15 Jun 2022 20:43:59 +0000 (+0200) Subject: docs: small update to follow conventions (#1373) X-Git-Tag: @pinia/nuxt@0.2.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3dc579460f7f97cea9a31e8a2c77b4d8ad515f5;p=thirdparty%2Fvuejs%2Fpinia.git 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`. --- 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: [],