We will use npm package: https://www.npmjs.com/package/react-iframe
to use iframe in reactjs. this is Simple React component for including an iframed page.
First of all just simply run command to install the package in your project:
npm i react-iframe
Now import react-iframe in your js file:
import Iframe from 'react-iframe'
Then add Iframe with youtube video link:<Iframe ="http://www.youtube.com/embed/xDMP3i36naA"="450px"="450px"="myId"="myClassname"="initial"="relative"/>
Basic Properties
url (required) - string the iframe url.
src (optional) - string if set, overrides url.
scrolling (optional) - string not set if if not provided .
overflow (optional)- string default to "hidden".
Thank You