I am having a component which may have several child components at same level like
<parent>
<input />
<child>
<input />
</child>
<child></child>
<child></child>
</parent>
Either of child or parent may have input
elements.
I am trying to get is if any of input element gets focus then its parent should get a call (other than manual). And if child component gets this info of input getting focus should be able to propagate it to parent without using EventEmitter
.
I can use event emitter but if nesting of child increases then it would not be a good way. Can we do it more simpler?