React子组件怎么改变父组件的state
1.父组件
class Father extends React.Component { construtor(props){ super(props); this.state={ isRed: 0 } } onChangeState(isTrue){ this.setState(isTrue) } render(){颜色:{this.state.isRed}
}}
2.子组件
class Child extends React.Component { render(){