Skip to content

Commit

Permalink
docs: make obvious where the store come from (#1687)
Browse files Browse the repository at this point in the history
* docs: make obvious where to import store from

As we browse through the modules page, it is unclear where the `store` is imported from.

Since it is a one liner, I thought it would clarify to have the import explicitly here.

Tell me what you think.

* docs: import vuex instead of store

Co-Authored-By: Katashin <[email protected]>

Co-authored-by: Katashin <[email protected]>
  • Loading branch information
elevatebart and ktsn authored Mar 11, 2020
1 parent 3a79b6d commit 4d7f390
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guide/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ export function createPlugin (options = {}) {
You can register a module **after** the store has been created with the `store.registerModule` method:

``` js
import Vuex from 'vuex'

const store = new Vuex.Store({ /* options */ })

// register a module `myModule`
store.registerModule('myModule', {
// ...
Expand Down

0 comments on commit 4d7f390

Please sign in to comment.