Share your code. Components are building blocks, you are the architect.

components/backbone-mixin
v0.0.1
0.0.1
MIT
PUBLIC
0
0     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass
BackboneMixin - automatic binding and unbinding for react classes mirroring
Gravatar for undefined
khan
Contributors
Gravatar for undefined
8

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use components/backbone-mixin in your project
npm i @bit/khan.react-components.components.backbone-mixin
Copied

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.