I have this structure in app, each level is a component:
Assigning
├── Assignee (key='user0')
│ ├── AssigneeTask (key='user0task0')
| | └── button (onClick)
│ ├── AssigneeTask (key='user0task1')
| | └── button (onClick)
| └── AssigneeTask (key='user0task2')
| └── button (onClick)
├── Assignee (key='user1')
└── Assignee (key='user2')
I want to remove Assignee component when i click on button in it using the key of component, how can i do this in reactjs?
I tried to pass the key to the onClick and set the display to none, but i can't get the component by its key!
Assigning?