Skip to content
backbone-aware mixins for react and a whole lot more
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
tutorials
.gitignore
.jshintrc
.npmignore
.travis.yml
LICENSE
README.md
api.md
bower.json
build.js
index.js
package.json
react-backbone-min.js
react-backbone.js
release-notes.md

README.md

react-backbone

Give Backbone awareness to your React components and so much more.

  • give Backbone.Model / Backbone.Collection awareness to your React components
  • mixins for updating on model change events, be aware of model xhr activity and model validation events and more
  • add Backbone.View like declaritive events to your React components
  • add dependency management to your React mixins
  • use Backbone.Model-aware input components
  • includes managed event bindings which will clean up when the React component is unmounted

This project indludes/depends on the following other projects

Common Examples

    React.createClass({
      mixins: ['modelChangeAware'],

      render: function() {
        // will be called any time this.props.model is changed
      }
    });
    React.createClass({
      mixins: ['modelXHRAware'],

      render: function() {
        // this.state.loading will be truthy during any XHR activity initiated by this.props.model
      }
    });
    React.createClass({
      mixins: ['modelEvents'],

      events: {
        'model:foo': 'onFoo',
        '*throttle(300)->model:foo': 'onThrottledFoo'
        ''
      },

      onFoo: function() {
        will be executed when this.props.model triggers the "foo" event
      },

      onThrottledFoo: function() {
        will be executed and throttled (300ms) when this.props.model triggers the "foo" event
      },
    });

Docs

View the installation and API docs

Tutorials

You can’t perform that action at this time.