export class Cat extends React.Component {
state = {
catsImg: imgArr,
kittie: this.props.cats,
catInfo: [ ],
}
takeInfo = (catPrice) => {
this.setState(state => ({
catInfo: {...state.kittie.filter(cat=>{
catPrice === cat.total
})}
}))
}
<button onClick={() => {
this.takeInfo(cat.total)
}}>Buy</button>