Skip to content

Instantly share code, notes, and snippets.

@wolfflow
Last active August 29, 2015 14:23
Show Gist options
  • Save wolfflow/0d035ecd5fb418f273e2 to your computer and use it in GitHub Desktop.
Save wolfflow/0d035ecd5fb418f273e2 to your computer and use it in GitHub Desktop.
React without JSX | LS
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