From: Eduardo San Martin Morote Date: Fri, 30 Apr 2021 09:12:52 +0000 (+0200) Subject: docs: import exports X-Git-Tag: v2.0.0-alpha.14~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b4bc6babb503045683ca14334ed9db4ecdb25ca;p=thirdparty%2Fvuejs%2Fpinia.git docs: import exports --- diff --git a/docs/introduction.md b/docs/introduction.md index 53969909..406e8735 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -7,6 +7,7 @@ Pinia [started](https://github.com/posva/pinia/commit/06aeef54e2cad66696063c6282 You start by creating a store: ```js +// stores/counter.js import { defineStore } from 'pinia' export const useCounterStore = defineStore({ @@ -22,6 +23,8 @@ export const useCounterStore = defineStore({ And then you _use_ it in a component: ```js +import { useCounterStore } from '@/stores/counter' + export default { setup() { const counter = useCounterStore()