An open API service indexing awesome lists of open source software.

https://github.com/future-team/gfs-redux-bind-react

redux react 两者建立关系
https://github.com/future-team/gfs-redux-bind-react

Last synced: 24 days ago
JSON representation

redux react 两者建立关系

Awesome Lists containing this project

README

          

# gfs-redux-bind-react
bind react with redux

## Usage
the `BindReact` component must have properties are `module` and `reducers`
- `module` is a `react` component
- `reducers` is a describe for action, normally it have a `fetching` props

the `devTools`, `middleware` are optional
- `devTools` to set the react-dev-tools
- `middleware` add `react-redux` middleware for this component

the following is full demo to describe how to use this, the detail please clone the code and run command
```bash
$ npm run test
```

```javascript
import React, { Component ,PropTypes} from 'react';
import {render} from "react-dom";
import {BindReact} from 'gfs-redux-bind-react'
import Tools from 'gfs-redux-bind-react/lib/Tools'
import App from './container.jsx'
import * as reducers from '../reducers/index.es6';
import {LoadingBarComponent, Connect} from 'gfs-loadingbar/lib/index.react'
import {fetching} from 'gfs-loadingbar/lib/react/fetching'
import FetchMiddleware from 'gfs-loadingbar/lib/react/FetchMiddleware'
import createLogger from 'redux-logger'
const logger = createLogger()

//判断执行dev环境
render(




,
document.getElementById('root')
);
```
## Developer

```bash
# test
$ npm run test
# build
$ npm run build
# run demo
$ npm start
```