Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kolesoffac/redux-store-mixin
Mixin for integrate action creators in methods of vue component
https://github.com/kolesoffac/redux-store-mixin
Last synced: about 1 month ago
JSON representation
Mixin for integrate action creators in methods of vue component
- Host: GitHub
- URL: https://github.com/kolesoffac/redux-store-mixin
- Owner: kolesoffac
- Created: 2017-08-24T09:22:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-30T13:40:09.000Z (over 6 years ago)
- Last Synced: 2024-01-25T05:10:29.215Z (4 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue. - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin ★1 - Mixin for integrate action creators in methods of vue-component (Utilities / State Management)
- awesome-vue - redux-store-mixin - Mixin for integrate action creators in methods of vue-component (Components & Libraries / Utilities)
README
# redux-store-mixin
[![NPM](https://nodei.co/npm/redux-store-mixin.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/package/redux-store-mixin)[![npm version](https://img.shields.io/npm/v/redux-store-mixin.svg?style=flat-square)](https://www.npmjs.com/package/redux-store-mixin)
[![npm downloads](https://img.shields.io/npm/dm/redux-store-mixin.svg?style=flat-square)](https://www.npmjs.com/package/redux-store-mixin)Mixin for integrate action creators in methods of vue component
## Install
```js
npm install --save redux-store-mixin```
## Usage
**1.** Import mixin
```js
import reduxStoreMixin from "redux-store-mixin";
```**2.** Import our actionCreators
```js
import {actionCreators} from "store/store";
```**3.** Import mapState-method for useful connect with props from redux-store
```js
import { mapState } from "vuex";
```**4.** Create vue instance
```js
new Vue({
mixins: [
...
reduxStoreMixin(actionCreators),
...
],
computed: {
...mapState({
prop1: state => state.redux.map.prop1,
...
propN: state => state.redux.map.propN
}),
...
},
...
});
```### Example
Call action:
```js
...
methods: {
someMethod: function () {
this.reduxActions("actionName", [...argsForAction]);
}
},
...
```For more information [see](https://habrahabr.ru/post/336352/)