Last active
August 29, 2015 14:23
-
-
Save wolfflow/0d035ecd5fb418f273e2 to your computer and use it in GitHub Desktop.
React without JSX | LS
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
window <<< React.DOM | |
console.log h1, 'h1' | |
# works properly | |
React.render(h1(null,'foo'), document.body) | |
Bar = React.createClass do | |
render: -> h1 null, 'bar' | |
# !!!throws an error: Uncaught TypeError: Cannot read property '__reactAutoBindMap' of undefined | |
# React.render(Bar(null), document.body) | |
# following would do well | |
React.render do | |
React.createElement(Bar, null) | |
document.body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment