]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: typos
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 17 Jan 2020 17:02:37 +0000 (18:02 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 20 Jan 2020 18:21:46 +0000 (19:21 +0100)
README.md

index 3aa8eebab55296d69274677a347fce4dc5e9e990..4b250cb565f3fa00fc349176ef947717efbac2c2 100644 (file)
--- a/README.md
+++ b/README.md
@@ -134,7 +134,7 @@ import { useMainStore } from '@/stores/main'
 // so just don't do it
 const main = useMainStore()
 
-export default createComponent({
+export default defineComponent({
   setup() {
     return {}
   },
@@ -144,7 +144,7 @@ export default createComponent({
 Once you have access to the store, you can access the `state` through `store.state` and any getter directly on the `store` itself as a _computed_ property (from `@vue/composition-api`) (meaning you need to use `.value` to read the actual value on the JavaScript but not in the template):
 
 ```ts
-export default createComponent({
+export default defineComponent({
   setup() {
     const main = useMainStore()
     const text = main.state.name
@@ -156,10 +156,10 @@ export default createComponent({
 
 `state` is the result of a `ref` while every getter is the result of a `computed`. Both from `@vue/composition-api`.
 
-Actions are called invoked like methods:
+Actions are invoked like methods:
 
 ```ts
-export default createComponent({
+export default defineComponent({
   setup() {
     const main = useMainStore()
     // call the action as a method of the store