# wheel-test-react-model

> reactjs项目数据层测试

Latest version **1.0.2** (published 2017-01-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install wheel-test-react-model
pnpm add wheel-test-react-model
yarn add wheel-test-react-model
bun add wheel-test-react-model
```

## 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.2 |
| Published | 2017-01-19 |
| First published | 2017-01-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Able |
| Maintainers | able.chy |

## Links

- npm: https://www.npmjs.com/package/wheel-test-react-model
- npm.io page: https://npm.io/package/wheel-test-react-model

## Dependencies (4)

- [redux](https://npm.io/package/redux.md) ^3.6.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.2
- [redux-thunk](https://npm.io/package/redux-thunk.md) ^2.2.0
- [redux-logger](https://npm.io/package/redux-logger.md) ^2.7.4

## Recent versions

- 1.0.2 (latest) — 2017-01-19
- 1.0.1 — 2017-01-19
- 1.0.0 — 2017-01-19

## README

##Aes
*latest update at 2017-01-19*
*author Able*
####Des
用于React项目数据层测试
####Usage
*Action*
```
const Action = {
    test:(params)=>{
        return (dispatch)=>{
            // do something
            dispatch(...);
        }
    }
```
*Reducer*
```
const defaultUserState = {
    userInfo: {},
    loginInfo: {},
    testParams: {}
}
export default function userReducer(state = defaultUserState, action) {
    switch (action.type) {
        case 'TEST':
            return Object.assign({}, state, {testParams: action.params})
        default:
            return state;
    }
}
```
*Test*
```
import Action from './model/action';
import Reducer from './model/reducer';
import createProvider from 'wheel-test-react-model';
const cp = new createProvider(Action, Reducer);
const defaultActionParams = {
    login: 'account=admin;password=admin',
    test: 'name=test'
}
const Test = cp.createContainer(defaultActionParams);
export default Test;
```

---
_Source: https://npm.io/package/wheel-test-react-model · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
