Efficient Youtube Embed

Lib usage so your youtube embed won't bloat your website

––– views

This package allow us to embed a Youtube Video without actually loading the iframe, so we only show the thumbnail as an image then only load the iframe if clicked

Package Dependencies

yarn add react-lite-youtube-embed
bash

And add this to globals.css

.yt-lite::before { content: none !important; }
css

Usage

import LiteYouTubeEmbed from 'react-lite-youtube-embed'; import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css'; <LiteYouTubeEmbed id='dHAbmoFHqgA' poster='hqdefault' noCookie={true} />;
jsx