react tablic Jeśli identyfikator jest obecny, nie dodawaj elementu

  addPerson = (person) => {
    let filteredPerson = this.state.likes.filter(like => like.name !== person.name);
    this.setState({
      likes: [...filteredPerson, person]
    })        
  }
Yawning Yak