The child component passes parameters to the parent component (without redux)?

like RadioGroup and Radio in antd

<RadioGroup onChange={this.onChange} value={this.state.value}>
   <Radio value={1}>A</Radio>
   <Radio value={2}>B</Radio>
   <Radio value={3}>C</Radio>
   <Radio value={4}>D</Radio>
</RadioGroup>

how do you trigger onChange when you click on Radio?

Aug.14,2021

look at the source code and you can see that Context is passed

.

Group:

static childContextTypes = {
    radioGroup: PropTypes.any,
};

getChildContext() {
    return {
      radioGroup: {
        onChange: this.onRadioChange,//this.props.onChange
      },
    };
  }

Radio:

static contextTypes = {
    radioGroup: PropTypes.any,
};
render(){
    //onChange
    radioProps.onChange = this.context.radioGroup.onChange;
}

take a look at the source code of antd, and set context, in Radio.Group

  python tutorial  

Menu