# next-themes changelog > Theme switching for React and Next.js without a flash of the wrong theme. - Vendor: Paco Coursey - Category: Frameworks & Libraries - Official site: https://github.com/pacocoursey/next-themes - Tracked by: What's New (https://whatsnew.fyi/product/next-themes) - Harvested from: GitHub (pacocoursey/next-themes) - Entries below: 9 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## Releases ### v0.4.6 - Date: 2025-03-11 - Version: v0.4.6 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.6 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.6 ##### What's Changed * fix: add null check for value in updateDOM function to prevent runtime errors and flashing by @groveom in https://github.com/pacocoursey/next-themes/pull/344 ##### New Contributors * @groveom made their first contribution in https://github.com/pacocoursey/next-themes/pull/344 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.5...v0.4.6 ### v0.4.5 - Date: 2025-03-09 - Version: v0.4.5 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.5 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.5 ##### What's Changed * fix: map theme to class using ValueObject in injected script by @danielgavrilov in https://github.com/pacocoursey/next-themes/pull/330 * Reduce number of renders by pre-setting resolvedTheme by @wahba-openai in https://github.com/pacocoursey/next-themes/pull/338 * Bump next from 14.2.10 to 14.2.15 in the npm_and_yarn group across 1 directory by @dependabot in https://github.com/pacocoursey/next-themes/pull/331 * Bump the npm_and_yarn group across 1 directory with 7 updates by @dependabot in https://github.com/pacocoursey/next-themes/pull/341 * chore: Fix corepack errors in CI by @pacocoursey in https://github.com/pacocoursey/next-themes/pull/342 ##### New Contributors * @danielgavrilov made their first contribution in https://github.com/pacocoursey/next-themes/pull/330 * @wahba-openai made their first contribution in https://github.com/pacocoursey/next-themes/pull/338 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.4...v0.4.5 ### v0.4.4 - Date: 2024-12-05 - Version: v0.4.4 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.4 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.4 ##### What's Changed * fix: infinite loop theme flicker by @arturbien in https://github.com/pacocoursey/next-themes/pull/329 ##### New Contributors * @o1Suleyman made their first contribution in https://github.com/pacocoursey/next-themes/pull/328 * @arturbien made their first contribution in https://github.com/pacocoursey/next-themes/pull/329 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.3...v0.4.4 ### v0.4.3 - Date: 2024-11-04 - Version: v0.4.3 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.3 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.3 ##### What's Changed - Pass `nonce` to inline style tag when using `disableTransitionOnChange` **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.2...v0.4.3 ### v0.4.2 - Date: 2024-11-04 - Version: v0.4.2 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.2 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.2 ##### What's Changed * Re-export types from `next-themes` by @cschroeter in https://github.com/pacocoursey/next-themes/pull/321 ##### New Contributors * @cschroeter made their first contribution in https://github.com/pacocoursey/next-themes/pull/321 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.1...v0.4.2 ### v0.4.1 - Date: 2024-11-04 - Version: v0.4.1 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.1 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.1 ##### What's Changed * fix: support multiple attributes in the injection script by @Julian24Design in https://github.com/pacocoursey/next-themes/pull/310 * docs: update docs on how to use with tailwindcss >3.4.1 by @trm217 in https://github.com/pacocoursey/next-themes/pull/290 * chore: use corepack instead of pnpm setup action in ci by @trm217 in https://github.com/pacocoursey/next-themes/pull/291 * Add dynamic loading as a way to avoid hydration mismatch in README by @Judge-Paul in https://github.com/pacocoursey/next-themes/pull/249 * Add `scriptProps` prop to prevent Cloudflare Rocket Loader deferring script by @andreacassani in https://github.com/pacocoursey/next-themes/pull/156 ##### New Contributors * @Julian24Design made their first contribution in https://github.com/pacocoursey/next-themes/pull/310 * @Judge-Paul made their first contribution in https://github.com/pacocoursey/next-themes/pull/249 * @andreacassani made their first contribution in https://github.com/pacocoursey/next-themes/pull/156 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.4.0...v0.4.1 ### v0.4.0 - Date: 2024-11-04 - Version: v0.4.0 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.4.0 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.4.0 ##### What's Changed * Improved inline script minification by @pacocoursey in https://github.com/pacocoursey/next-themes/pull/262 * fix: manually type ThemeProvider to fix type errors by @BlankParticle in https://github.com/pacocoursey/next-themes/pull/263 * mention `next-themes` is react agnostic by @dimaMachina in https://github.com/pacocoursey/next-themes/pull/268 * fix: make `children` optional by @Innei in https://github.com/pacocoursey/next-themes/pull/276 * feat: Allow Multiple Attributes by @trenaryja in https://github.com/pacocoursey/next-themes/pull/275 * fix: setTheme now works correctly when a function is passed. by @trm217 in https://github.com/pacocoursey/next-themes/pull/286 * feat: add react v19 to peer deps by @Yonom in https://github.com/pacocoursey/next-themes/pull/315 ##### New Contributors * @Hahlh made their first contribution in https://github.com/pacocoursey/next-themes/pull/255 * @Unsleeping made their first contribution in https://github.com/pacocoursey/next-themes/pull/229 * @Innei made their first contribution in https://github.com/pacocoursey/next-themes/pull/276 * @trenaryja made their first contribution in https://github.com/pacocoursey/next-themes/pull/275 * @lloydrichards made their first contribution in https://github.com/pacocoursey/next-themes/pull/256 * @Yonom made their first contribution in https://github.com/pacocoursey/next-themes/pull/315 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.3.0...v0.4.0 ### v0.3.0 - Date: 2024-03-13 - Version: v0.3.0 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.3.0 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.3.0 ##### What's * `"use client"` was added to the library output so that you can use it as a React Client component without creating a wrapper. ##### New Contributors * @MaxLeiter made their first contribution in https://github.com/pacocoursey/next-themes/pull/120 * @gnoff made their first contribution in https://github.com/pacocoursey/next-themes/pull/135 * @WITS made their first contribution in https://github.com/pacocoursey/next-themes/pull/168 * @dimaMachina made their first contribution in https://github.com/pacocoursey/next-themes/pull/186 * @amrhassab made their first contribution in https://github.com/pacocoursey/next-themes/pull/192 * @BekzodIsakov made their first contribution in https://github.com/pacocoursey/next-themes/pull/241 * @BlankParticle made their first contribution in https://github.com/pacocoursey/next-themes/pull/253 **Full Changelog**: https://github.com/pacocoursey/next-themes/compare/v0.2.0...v0.3.0 ### v0.2.0 - Date: 2022-05-05 - Version: v0.2.0 - Original notes: https://github.com/pacocoursey/next-themes/releases/tag/v0.2.0 - Permalink: https://whatsnew.fyi/product/next-themes/releases/v0.2.0 ###### Mildly Breaking Changes These changes shouldn't affect 99% of usage of this library, but they're good to be aware of. - Switches from `next/script` to a regular `script` tag inserted at the top of the `` - Replaces the base64 encoded script contents with a regular string again ###### Fixes - Fixes a bug with undefined references in the injected script - Supports CSP `nonce` again because the injected script is no longer base64 encdoed - Types are once again bundled in the published version - Fixes #107 - Fixes #106 - Fixes #99 - Fixes #94 - Fixes #90