So, I'm doing a little web app using React Typescript and I have one problem I'm unable to fix.
My app obtains from an external API (using a POST request) a plotly graph in text/html. What I need to do is to inject this HTML and JS in my React App in order to be displayed in the browser.
What is the best way to do this? I've tried different approaches and nothing seems to work. I think the HTML components are being rendered, but the JS isn't being executed.
I need to inject something using this structure. The code bellow is not completed.
<div>
<div id="div-1" class="plotly-graph-div" style="height:100%, width:100%">
Plotly.newPlot("div-1",...)
</div>
</div>
Thanks in advance :)