Set value and label of Radio.
1
() => <Radio value="China" label="China" />
Set defaultChecked of Radio.
1
() => <Radio value="China" defaultChecked label="China" />
2
const onChange = (val) => {
7
<RadioGroup onChange={onChange}>
8
<Radio label="China" value="China" />
9
<Radio label="USA" value="USA" />
2
const [value, setValue] = React.useState('China');
10
const onChange = (val) => {
15
<RadioGroup value={value} onChange={onChange}>
16
<Radio label="China" value="China" />
17
<Radio label="USA" value="USA" />
20
<Button onClick={toggle}>Switch</Button>