]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: import exports
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 30 Apr 2021 09:12:52 +0000 (11:12 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 30 Apr 2021 09:12:52 +0000 (11:12 +0200)
docs/introduction.md

index 53969909d97eefd06380b80db6c0e1aee899a15f..406e87352b28d7831f29d2429ea1b4787713c03a 100644 (file)
@@ -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()