How to set valuePropName and initialValue of antd switch components dynamically

step 1, in parent component:

constructor(props) {
    super(props);
    this.state = {
        checkState:"checked",
        enable:true
    }
} 

this.setState({
    checkState:"unChecked",
    enable:false
})

step 2: before calling the subcomponent form

<FormE ref={this.saveFormRef} checkState={this.state.checkState} enable={this.state.enable}/>

step 3: form subcomponents

const { form,checkState,enable} = this.props;
const { getFieldDecorator } = this.props.form;

{getFieldDecorator("status", {
      rules: [{ required: false}],
      valuePropName:{checkState},
      initialValue:{enable}
                                        
 })(
    <Switch checkedChildren="" unCheckedChildren=""/>
 )}

run the error message, valuePropName: {checkState} how should I write here to set it dynamically? I"m much obliged!

Mar.04,2021

official document ) the description is very clear:

const { form,checkState,enable} = this.props;
const { getFieldDecorator } = this.props.form;
{getFieldDecorator('status', {
      rules: [{ required: false}],
      valuePropName: 'checked',
      initialValue: enable
                                        
 })(
    <Switch checkedChildren="" unCheckedChildren=""/>
 )}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b22796-2b601.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b22796-2b601.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?