# redux-store-mixin

> Mixin for integrate action creators in methods of vue component

Latest version **1.0.6** (published 2017-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-store-mixin
pnpm add redux-store-mixin
yarn add redux-store-mixin
bun add redux-store-mixin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2017-10-11 |
| First published | 2017-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anatoly Kolesov |
| Maintainers | kolesoffac |
| Keywords | vue, mixin, redux |

## Links

- npm: https://www.npmjs.com/package/redux-store-mixin
- Repository: https://github.com/kolesoffac/redux-store-mixin
- Homepage: https://github.com/kolesoffac/redux-store-mixin#readme
- Issues: https://github.com/kolesoffac/redux-store-mixin/issues
- npm.io page: https://npm.io/package/redux-store-mixin

## Dependencies (9)

- [rollup](https://npm.io/package/rollup.md) ^0.37.2
- [npm-run-all](https://npm.io/package/npm-run-all.md) ^4.1.1
- [rollup-watch](https://npm.io/package/rollup-watch.md) ^2.5.0
- [rollup-plugin-babel](https://npm.io/package/rollup-plugin-babel.md) ^2.7.1
- [rollup-plugin-progress](https://npm.io/package/rollup-plugin-progress.md) ^0.4.0
- [rollup-plugin-uglify-es](https://npm.io/package/rollup-plugin-uglify-es.md) ^0.0.1
- [babel-preset-es2015-rollup](https://npm.io/package/babel-preset-es2015-rollup.md) ^3.0.0
- [babel-plugin-transform-object-rest-spread](https://npm.io/package/babel-plugin-transform-object-rest-spread.md) ^6.23.0
- [babel-plugin-syntax-trailing-function-commas](https://npm.io/package/babel-plugin-syntax-trailing-function-commas.md) ^6.22.0

## Recent versions

- 1.0.6 (latest) — 2017-10-11
- 1.0.5 — 2017-09-05
- 1.0.0 — 2017-08-25

## 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/)

---
_Source: https://npm.io/package/redux-store-mixin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
