I want to render react components with html, and my react component must listen states, but I can`t do it..
{component} = <span>ComponentText</span>
I have something like this and this Array can be in different orders and different combinations, for example:
let result = ['<div><p>123', {component}, '</p></div>', {component}];
With "dangerouslySetInnerHTML", I have:
123[Object][Object]
Without "dangerouslySetInnerHTML":
<div><p>123ComponentText</p></div>ComponentText
I`m looking for result like this:
123ComponentTextComponentText
And my states and events with this component must work well, Is it possible?