Q:

how to write a filter in react js with checkbox

i have a cont that later on will be replaced with a api but now it looks like this which is similar to the later api :
const foo = {
 {'id':1,
 'price':200,
 'type':1,},
  {'id':2,
 'price':200,
 'type':2,},
};

and i am using a simple matterial ui checkbox :
render() {
const { classes } = this.props;

return (
  <FormGroup row>
    <FormControlLabel
      control={
        <Checkbox
          checked={this.state.checkedA}
          onChange={this.handleChange('checkedA')}
          value="checkedA"
        />
      }
      label="type A"
    />

now i want a simple filter system for when this checkbox in checked just bring the first item which type is 1 or the price is 200 for example 

A:

What I understand is that you need to filter your data based on what checkbox is checked.  If your data is an array you can filter it like this:
const foo = [
 { 'id': 1, 'price': 200, 'type': 1 },
 { 'id': 2, 'price': 200, 'type': 2 }
];

const filteredData = foo.filter(item => item.type === selectedType);

where selectedType is your checked checkbox's value. 
I hope this helps.