Let\'s say I have nested components like this:
cl
If you want to distinguish which element was clicked at the end, you may use Event object and find there some interesting stuff, such as DOM element type.
this.eventHandler(e)}>Click me
eventHandler = (e) => {
console.log(e, e.nativeEvent.toElement.nodeName);
...}
And you get button or input depending on what you've clicked. That's what i looked for for my project.
More over you may find a DOM tree in an array representation
Hope it helps