We have subjectChecks : [] as state .I fear that this method of changing state my go wrong .Is it ok to change state this way by pushing?
handleSubjectChange = (termID,subjectID) => event => {
if(event.target.checked){
this.state.subjectChecks.push({termID,subjectID});
} else {
this.state.subjectChecks.pop({termID,subjectID});
}
//this.setState({ [termID]: event.target.checked });
};