I am new to ReactJS and learning some samples exercises online. Have trouble rendering a simple tag on the browser. Have an Uncaught syntax error that doesnt make sense.
I am returning only 1 tag which was the only nesting issue reported on React related issue in this forum. Can you help me troubleshoot this pls.
Code below
/** @jsx React.DOM */ var MySelect = React.createClass({ getInitialState: function(){ return { selected:false }; } render: function(){ var mySelectStyle = { border: '1px solid #999', display: 'inline-block', padding: '5px' }; return ( //react div element, via JSX, containing <MyOption> component <div style={mySelectStyle}> <MyOption value="Volvo"></MyOption> <MyOption value="Saab"></MyOption> <MyOption value="Mercedes"></MyOption> <MyOption value="Audi"></MyOption> </div> ); } }); var MyOption = React.createClass({ /* render: function(){ return <div> {this.props.value} </div> ; } */ }); ReactDOM.render(<MySelect />, document.getElementById('app')); </script> </body> </html>