Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add README example using Vuex store modules #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -44,6 +44,21 @@ const store = new Vuex.Store({
});
```

If you're using [store modules](https://vuex.vuejs.org/guide/modules.html), these are supported, too:

```js
import createMutationsSharer from "vuex-shared-mutations";
import ItemStore from './stores/item_store';

const store = new Vuex.Store({
// ...
modules: {
ItemStore
},
plugins: [createMutationsSharer({ predicate: ["ItemStore/mutation1", "ItemStore/mutation2"] })]
});
```

## API

### `createMutationsSharer([options])`
Expand Down