import React from 'react'import ReactDOM from 'react-dom';import Backbone from 'backbone';function Paragraph(props) {
return
{props.text}
;}const ParagraphView = Backbone.View.extend({
el:'body',
render() {
const text = this.model.get('text');
ReactDOM.render(, this.el);
return this;
},
remove() {
ReactDOM.unmountComponentAtNode(this.el);
Backbone.View.prototype.remove.call(this);
}});const model = new Backbone.Model({ text: 'React works with Backbone!' });const view = new ParagraphView({ model, el: "#root" });view.render();