Backbone.ReactBridge
A toolkit for transforming Backbone views to React components and vice versa. 🚀
Installation
$ npm install --save-dev backbone.react-bridge
Usage
React Component ➡️ Backbone View
This function allows you to get a Backbone.View from a React component. It accepts as input a React Component instance or class along with some extra options.
Full blown example with available options:
const fooView = ReactBridge; fooView; // Or if using Marionette.js region;
None of the options described above are required in order to use the viewFromComponent function.
Backbone View ➡️ React Component
This function allows you to get a React component from a Backbone view. It accepts either a Backbone.View instance or class along with some extra options.
Full blown example with available options:
const Bar = ReactBridge; ReactDOM;
None of the options described above are required in order to use the componentFromView function.
Examples
$ npm install
$ npm start
Enjoy! 😊
Build
$ npm run build
Test & Coverage
$ npm run coverage