diff --git a/examples/vuex-store/README.md b/examples/vuex-store/README.md index 0932cd9eb0..4bf9cbec9e 100644 --- a/examples/vuex-store/README.md +++ b/examples/vuex-store/README.md @@ -2,21 +2,13 @@ > Using a store to manage the state is important to every big application, that's why nuxt.js implement Vuex in its core. -## Activate the store option +## Activating the store -First, we need to tell nuxt.js to activate the store, for this, we add a `nuxt.config.js` file: - -```js -module.exports = { - store: true -} -``` +Nuxt.js will try to `require('./store/index.js')`, if exists, it will import `Vuex`, add it to the vendors and add the `store` option to the root `Vue` instance. ## Create the store folder -When the store option is activated, nuxt will import it via `require('./store')` - -After creating the `store/` folder, we can create our `store/index.js` file: +Let's create a file `store/index.js`: ```js import Vue from 'vue' @@ -38,11 +30,11 @@ const store = new Vuex.Store({ export default store ``` -> You don't need to install vuex since it's shipped with nuxt.js +> We don't need to install `Vuex` since it's shipped with nuxt.js ## VoilĂ  ! -You're ready to use `this.$store` inside your `.vue` files :) +We can now use `this.$store` inside our `.vue` files. ```html