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