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 两者建立关系
- Host: GitHub
- URL: https://github.com/future-team/gfs-redux-bind-react
- Owner: future-team
- License: mit
- Created: 2016-12-16T03:54:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T09:04:17.000Z (over 8 years ago)
- Last Synced: 2025-02-08T11:45:46.149Z (over 1 year ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```