DEV Community

Cover image for Latest Release: React YouTube Playlist v2
Oluwatobi Sofela
Oluwatobi Sofela

Posted on • Originally published at codesweetly.com

Latest Release: React YouTube Playlist v2

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 named import. 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
Enter fullscreen mode Exit fullscreen mode

Alternatively, you can use Yarn or pnpm like so:

yarn upgrade @codesweetly/react-youtube-playlist --latest
Enter fullscreen mode Exit fullscreen mode
pnpm update @codesweetly/react-youtube-playlist --latest
Enter fullscreen mode Exit fullscreen mode

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";
Enter fullscreen mode Exit fullscreen mode

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)