ReactJS Components not showing any output
I am learning React and am stuck with the problem that the components I make, their functions don’t show any output, though there’s no error message but still I get a blank screen. But when I try to return plain text in app.js, it works fine. Here’s my code:
How to prevent localhost prefixes being added to the link
I am trying to add an iframe which show the content of another html document to my current html document using this code:
display.innerHTML = '<iframe id="externalFrame" src="viewpage.html" style="width:80%; height: 700px;"></iframe><br><button class="button color" onclick="sendSelected();">Finish</button>';
I am using react and the current html document runs on http://localhost:3000/
However, somehow the prefixes http://localhost:3000/
being added automatically to the src in the iframe so it would looks like this: http://localhost:3000/viewpage.html. That link points to the current page itself so basically the iframe shows the current html page within the current html page. How do I fix this?