摘要:
class Parent extends React.Component{ constructor(){ super(); this.state={co:"red"} } render(){ return( <Child color={this.state.co}></Child> ) } } cl 阅读全文
摘要:
class Child extends React.Component{ constructor(props){ super(props); this.state={child:"我是子组件的值"}; this.props.getChild(this.state.child); } render() 阅读全文