Hey @stage3 I am getting this type of error.
The onChange prop of the first AgeCheckBox should set 18-25 to selectedAgeGroup state field
The onChange prop of the second AgeCheckBox should set 26-35 to selectedAgeGroup state field
The onChange prop of the second AgeCheckBox should set 36-50 to selectedAgeGroup state field
Is it because of something wrong with my handle change method?
`import React from 'react';
import AgeCheckBox from './AgeCheckBox';
class App extends React.Component {
state = {
selectedAgeGroup: undefined
}
handleChange = (event) => {
const { target: {value}} = event;
this.setState({selectedAgeGroup: value});
}
render() {
const {selectedAgeGroup} = this.state;
return (
<div>
<h2>What is your age?</h2>
<AgeCheckBox onChange={this.handleChange} checked={selectedAgeGroup === '18-25'} label="18-25" />
<AgeCheckBox onChange={this.handleChange} checked={selectedAgeGroup === '26-35'} label="26-35" />
<AgeCheckBox onChange={this.handleChange} checked={selectedAgeGroup === '36-50'} label="36-50" />
</div>
);
}
}
export default App;
`