# vuex-connect-layer

> use vuex by model

Latest version **1.0.1** (published 2018-06-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install vuex-connect-layer
pnpm add vuex-connect-layer
yarn add vuex-connect-layer
bun add vuex-connect-layer
```

## 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.1 |
| Published | 2018-06-05 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yeyusen |
| Maintainers | ytftianwen |
| Keywords | vuex, connect |

## Links

- npm: https://www.npmjs.com/package/vuex-connect-layer
- Repository: https://github.com/ytftianwen/vuex-model
- Homepage: https://github.com/ytftianwen/vuex-model#readme
- Issues: https://github.com/ytftianwen/vuex-model/issues
- npm.io page: https://npm.io/package/vuex-connect-layer

## Recent versions

- 1.0.1 (latest) — 2018-06-05
- 1.0.0 — 2018-06-05

## README

# vuex-connect-layer

> Using vuex with connect
## Build Setup
##install
### npm i vuex-connect-layer
将业务功能细分为容器组件与视图组件，同时改变vuex的使用方法，自动将store的state commit mutation action映射到
视图组件上
###.container
```js
import connector from 'vuex-connect-layer'
import connectViewList from '../components/connectViewList.vue'
import store from '../vuex/index.js'
const mapProps = {
  mapStateToProps: {
    comments: state => state.comments
  },
  mapDispatchToProps: {
    fetch: 'fetchComments'
  }
}
const h = connector.connect(mapProps, store)(connectViewList)
export default h
```
###use in view components
```html
<connect-container type="这是prop"></connect-container>
```

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