console.log
下方selected: false
注销 const App = React.createClass({
getInitialState : function() {
return {
selected: false
}
},
componentDidMount : function() {
this.setState({selected: true})
console.log(this.state);
},
render : function() {
return (
<li>test</li>
);
}
});
,即使我只是设置了状态。这是为什么?
{{1}}