I am new to react and when I say new I mean just started. I can't figure out why I'm not getting any header or paragraph to show.
This is what's in my script tag which has type text/babel
var myElements = React.createClass({
render: function(){
return <h1>Hello</h1>
<p>This is a paragraph </p>
}
});
React.render(<myElements/>, document.body);
I also have babel cdn in my header
Your component should start with upper case. https://facebook.github.io/react/docs/jsx-in-depth.html
var MyElements = React.createClass({
render: function(){
return <h1>Hello </h1>
}
});
React.render(<MyElements/>, document.body);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments