📅  最后修改于: 2022-03-11 15:01:24.511000             🧑  作者: Mango
addPerson = (person) => {
let filteredPerson = this.state.likes.filter(like => like.name !== person.name);
this.setState({
likes: [...filteredPerson, person]
})
}