React YouTube Playlist version 2 is out! 🥳
Let's discuss the highlights.
Breaking Changes
This release comes with one breaking change.
- Replace default
import
with namedimport
. This change provides better compatibility with Node and Babel-like tools.
Other Changes
- Replace EmotionJS dependency with inline styling.
- Convert all configuration files to TypeScript.
- Change the loading spinner's color to improve its contrast on dark and light background schemes.
How to Update the React YouTube Playlist Package
Here are the steps required to upgrade to the latest version:
Step 1: Install the latest version
npm install @codesweetly/react-youtube-playlist@latest
Alternatively, you can use Yarn or pnpm like so:
yarn upgrade @codesweetly/react-youtube-playlist --latest
pnpm update @codesweetly/react-youtube-playlist --latest
Step 2: Update the package's import
syntax
Replace the package's default import
statement with the named import
syntax like so:
- import YouTubePlaylist from "@codesweetly/react-youtube-playlist";
+ import { YouTubePlaylist } from "@codesweetly/react-youtube-playlist";
How to Use the React YouTube Playlist Package
See the complete project-based guide to learn how to add the YouTubePlaylist
package to your React applications. You can use the library with Vite, NextJS, Remix, or any other React app.
Top comments (0)