项目作者: jsonnull

项目描述 :
Ergonomic Redux bindings for React using render functions
高级语言: JavaScript
项目地址: git://github.com/jsonnull/redux-render.git
创建时间: 2017-09-25T17:04:15Z
项目社区:https://github.com/jsonnull/redux-render

开源协议:MIT License

下载


Redux Render

Build Status
Coverage Status
npm version

React bindings for Redux using render props.

  1. const Title = () => (
  2. <Redux selector={state => state.title}>
  3. {title => (
  4. <h1>{title}</h1>
  5. )}
  6. </Redux>
  7. )

Why use this?

Render props afford you a lot of flexibility over Higher-Order Components (HOCs).

  • Reactivity: Change selectors or dispatch calls on the fly as your component state and props change.
  • Brevity: It starts at just one line of code to connect to Redux in a performant way.
  • Flexibility: Using render props, you can easily create HOCs to support your own use-cases.

Installation

  1. yarn add redux-render
  2. # npm install --save redux-render

Examples

API