Created
November 26, 2014 22:14
-
-
Save ryanflorence/3c4597c1e95b3fd3c9e1 to your computer and use it in GitHub Desktop.
This file contains 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 SomeReactComponentInEmber = Ember.Component.extend({ | |
renderReact () { | |
var el = React.createElement(MyComponent, { | |
onSave: this.handleSave | |
}); | |
React.render(el, this.get('element')); | |
}.on('didInsertElement'), | |
teardownReact () { | |
React.unmountComponentAtNode(this.get('element')); | |
}.on('willDestroyElement'), | |
handleSave (data) { | |
this.sendAction('save', data); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment