摘要:
class Counter extends React.Component{ constructor(props,context) { super(props,context) this.state={ hou:0, second:0, minutes:0, strikes:0, } this.ti 阅读全文
摘要:
1.直接在子组件中使用(不推荐) class child extends component{ render( <div>{this.props.value}</div> ) } 2.自己在构造函数中初始化一个值,在将 status 通过 componentWillReceiveProps 生命周期 阅读全文