Created
February 17, 2016 18:46
-
-
Save rchrd2/9eadd9eae7ecf3e53d18 to your computer and use it in GitHub Desktop.
Using React with Backbone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HelloView = Backbone.View.extend({ | |
initialize: function() { | |
this.listenTo(this.model, "change", this.render, this); | |
this.render(); | |
}, | |
render: function() { | |
var reactEl = React.createElement('div', {}, 'Hello, World!'); | |
ReactDOM.render(reactEl, this.el); | |
return this; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment