I have a small problem. After requesting a data from a service I got an iframe code in response.
With ES6 you can now do it like this
Example Codepen URl to load
const iframe = '';
A function component to load Iframe
function Iframe(props) {
return ();
}
Usage:
import React from "react";
import ReactDOM from "react-dom";
function App() {
return (
Iframe Demo
,
);
}
const rootElement = document.getElementById("root");
ReactDOM.render( , rootElement);
Edit on CodeSandbox:
https://codesandbox.io/s/react-iframe-demo-g3vst