React new Version (0.12.2) released on December 18, 2014, compared to the v0.11.2 version I used before the change is very large, the basic writing is extended, so I immediately feel that I have to start again. The pit.
Things have to be re-adapted, first of all let's look at the basic wording of the REACT definition component:
v0.11.2 version of the wording:
var Klm = React.createClass({
render:function(){ return( <h1>hello!</h1> )
}
});
React.renderComponent(<Klm />,document.body);
v0.12.2 version of the wording:
var Klm = React.createClass({
render:function(){ return( <h1>hello!</h1> )
}
});
React.render(<Klm />,document.body);
Here rendercomponent is simplified to render, this is one!
var foo = {
width:‘100px‘,
height:‘100px‘,
border:‘1px solid #000‘ }; var myDivElement = <div style={foo} />;
React.render(myDivElement, document.body);
Second: Defining a label individually can be used in this way.
React version 0.12.2 Modify content