components/backbone-mixin
v0.0.1
0.0.1
Collaborators
Gravatar for undefined
8
MIT
PUBLIC
0
0     DEPENDENCIES
BuildPass

BackboneMixin - automatic binding and unbinding for react classes mirroring

Use components/backbone-mixin in your project
npm i @bit/khan.react-components.components.backbone-mixin

backboneMixin ()

BackboneMixin - automatic binding and unbinding for react classes mirroring backbone models and views.

Example

:
Example:

    const Model = Backbone.Model.extend({ ... });
    const Collection = Backbone.Collection.extend({ ... });

    const Example = React.createClass({
        mixins: [BackboneMixin],
        getBackboneModels: function() {
            return [this.model, this.collection];
        }
    });

List the models and collections that your class uses and it'll be
automatically `forceUpdate`-ed when they change.

This binds *and* unbinds the events.