I am trying to set up a basic react example using jspm/systemjs and babel. I have this code here to show a simple page and am getting an error
import React from 'react'; export default React.createClass({ displayName: 'MainComponent', propTypes: { item: React.PropTypes.object }, render: function render() { return ( <div class="builder-conteiner"> <div>; ); } }); React.render(<MainComponent />, document.getElementById('app'))
Nothing is showing up, the console is throwing "Unterminated JSX contents", and babel is pointing to the react.render
line:
17 | React.render(<MainComponent />, document.getElementById('app')) | ^
You have 2 unclosed <div>
tags in your render()
and a semicolon that probably doesn't belong. I'd get rid of those (e.g. close them, delete the semicolon in <div>;
if it doesn't belong) and try it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With