zackyang000 / react-linked-state

Deep path two-way binding for React.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-linked-state

Deep path two-way binding for React.

NPM Version npm Build Status License

npm install --save react-linked-state

Usage

Use it like official's Two-Way Binding Helpers, the only different is this module support deep path.

var LinkedStateMixin = require('react-linked-state');

var WithLink = React.createClass({
  mixins: [LinkedStateMixin],
  getInitialState: function() {
    return {data: {message: 'Hello!'}};
  },
  render: function() {
    return <input type="text" valueLink={this.linkState('data.message')} />;
  }
});

About

Deep path two-way binding for React.

License:MIT License


Languages

Language:JavaScript 90.7%Language:Makefile 9.3%