From: Eduardo San Martin Morote Date: Thu, 16 Jun 2022 07:22:01 +0000 (+0200) Subject: docs: line highlights X-Git-Tag: @pinia/nuxt@0.2.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ec3134508c078be31967062a1f244396132dfab;p=thirdparty%2Fvuejs%2Fpinia.git docs: line highlights --- diff --git a/packages/docs/getting-started.md b/packages/docs/getting-started.md index 54e91d9d..bf624fa1 100644 --- a/packages/docs/getting-started.md +++ b/packages/docs/getting-started.md @@ -30,7 +30,7 @@ app.mount('#app') If you are using Vue 2, you also need to install a plugin and inject the created `pinia` at the root of the app: -```js +```js{1,3-4,12} import { createPinia, PiniaVuePlugin } from 'pinia' Vue.use(PiniaVuePlugin) diff --git a/packages/docs/introduction.md b/packages/docs/introduction.md index 66d9b719..94fb0d4b 100644 --- a/packages/docs/introduction.md +++ b/packages/docs/introduction.md @@ -77,7 +77,7 @@ export const useCounterStore = defineStore('counter', () => { If you are still not into `setup()` and Composition API, don't worry, Pinia also support a similar set of [_map helpers_ like Vuex](https://vuex.vuejs.org/guide/state.html#the-mapstate-helper). You define stores the same way but then use `mapStores()`, `mapState()`, or `mapActions()`: -```js +```js{22,24,28} const useCounterStore = defineStore('counter', { state: () => ({ count: 0 }), getters: {