From: Eduardo San Martin Morote Date: Wed, 4 Aug 2021 14:01:03 +0000 (+0200) Subject: docs: it supports Vue 2 X-Git-Tag: v2.0.0-rc.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07ad9215fb889ab7ac247df1134b860baed9019d;p=thirdparty%2Fvuejs%2Fpinia.git docs: it supports Vue 2 --- diff --git a/README.md b/README.md index f52c37bf..327aa4e2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ - 🏗 Modular by design - 📦 Extremely light -Pinia works both for Vue 2.x and Vue 3.x and you are currently on the branch that supports Vue 3.x. **If you are looking for the version compatible with Vue 2.x, check the [`v1` branch](https://github.com/posva/pinia/tree/v1)**. +Pinia works both for Vue 2.x and Vue 3.x. It requires Vue 2 with `@vue/composition-api` `^1.1.0-0` or Vue `^3.2.0-0`. Pinia is is the most similar English pronunciation of the word _pineapple_ in Spanish: _piña_. A pineapple is in reality a group of individual flowers that join together to create a multiple fruit. Similar to stores, each one is born individually, but they are all connected at the end. It's also a delicious tropical fruit indigenous to South America. @@ -109,6 +109,8 @@ yarn add pinia@next npm install pinia@next ``` +Note: If you are using Vue `^3.2.0` or `@vue/composition-api` `^1.1.0` (with Vue 2), give `pinia@beta` a try! [Check this issue](https://github.com/posva/pinia/issues/592) for more information and to ask questions. + ## Usage ### Install the plugin @@ -121,9 +123,7 @@ import { createPinia } from 'pinia' app.use(createPinia()) ``` -This will also add devtools support. Some features like time traveling and editing are still not supported because vue-devtools doesn't expose the necessary APIs yet. - -### Creating a Store +### Create a Store You can create as many stores as you want, and they should each exist in different files: