"" How to convert JSX Transformer Babel official website: http://babeljs.io/Inside there is a can see conversion tester, ES6 What can also be applied:
Note: JSX to use uppercase class, for, style, OnChange is not a keyword. Style use style when using color = {{color: ' Red ', fontsize:20}}
"" Example two:
varHello =React.createclass ({render:function () {return( <span> Hello { This. Props.name}!</span> ); } }); varProps = {}; Props.name="Chen"; Props.age= -; varMyHello = ; Reactdom.render (Myhello,document.getelementbyid ('Example'))
"Use Strict";varHello =React.createclass ({displayName:"Hello", Render:function render () {returnReact.createelement ("span", NULL, "Hello", This. Props.name,"!" ); }});varProps ={};p rops.name="Chen";p rops.age= -;varMyHello =react.createelement (Hello, props); Reactdom.render (MyHello, document.getElementById ('Example'));
Reactjs Introduction to Combat (a)----jxs detailed