I have a component with functionally, let's say if you click on it, it does: alert("Hello World");
But now, let's say I want several components to have the same functionality, and these components can be expanded in the future, how can I do that in good way?
I thought about HOC but then I would have to decide which element to use, for example <div> but I want it to be generic so I could decide to put inside whatever element I need.
this.props.children