A responsive YouTube embed component for React.
With npm:
npm install --save react-youtube-embed
With Yarn:
yarn add react-youtube-embed
import YouTube from 'react-youtube-embed'
...
<YouTube id='A71aqufiNtQ' />
aspectRatio
: Set an aspect ratio or percentage. Default:"16:9"
prependSrc
: Prepends a string to the embed URL (before the YouTube ID). Default:"https://www.youtube.com/embed/"
appendSrc
: Appends a string to the embed URL. Default:""