Sorry if it is a dummy question.
I am trying to make a react website
I have a React function;
{this.state.graphNumber}
which returns a number of index of graphs. Please see the link below. e.g function returns 111
Update: Sorry it is a embed HTML-Link not a URL link
I need to add that number into a embed html-link for showing correct graph.
<iframe width="100%" height="100%" frameborder="0" scrolling="no" "src=//plot.ly/~username/111.embed?showlink=false&modebar=false&autosize=true" ></iframe>
I search the internet but I could not figure out.
Thank you for advance
If I understand you well, you want a dynamic URL. For that you can try something like that:
<iframe width="100%" height="100%" src={`//.url-is-here/${this.state.GraphNumber}`}></iframe>
Edit: Add brackets around dynamic url, thanks to @DTul comment below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With