Skip to content

Instantly share code, notes, and snippets.

@chandu0101
Last active August 29, 2015 14:26
Show Gist options
  • Save chandu0101/e99e6bc1bee80fa7b6cf to your computer and use it in GitHub Desktop.
Save chandu0101/e99e6bc1bee80fa7b6cf to your computer and use it in GitHub Desktop.
@ScalaJSDefined
class Hello extends React.Component {
def render() = {
Reac.createElement("div")
}
}
// render
React.render(React.createFactory(new Hello()), dom.document.body)
//error
Uncaught Error: Invariant Violation: React.render(): Invalid component element. Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment