Skip to content

Releases: datocms/react-datocms

v8.1.0

22 Jun 12:24

Choose a tag to compare

  • stega: add dedicated react-datocms/stega subpath f422829

v8.0.6...v8.1.0

v8.0.6 — default video poster to thumbnailUrl

15 Jun 14:00

Choose a tag to compare

  • VideoPlayer: default poster to data.thumbnailUrl a65dccd

v8.0.5...v8.0.6

v8.0.5 — automatic sizes="auto"

12 Jun 10:08

Choose a tag to compare

Automatic sizes="auto" for lazy-loaded responsive images

When you don't pass an explicit sizes prop (and the image isn't priority), the image components now emit sizes="auto, 100vw" together with loading="lazy".

On supporting browsers (Chrome/Edge 126+, Opera, Samsung Internet, Firefox 150+) the browser picks the optimal srcset candidate from the image's real laid-out width instead of assuming the full viewport width (100vw) — often a much smaller download. Browsers without support (e.g. Safari) fall back to 100vw, i.e. the previous behavior, so there is no regression.

  • An explicit sizes (prop, or coming from the responsiveImage GraphQL query) still takes precedence — we never override it.
  • priority images are unchanged (they load eagerly, and sizes="auto" requires loading="lazy").
  • Applies to both the SSR/native components and the JavaScript lazy-loading components.

v8.0.4 — stega utils moved out of the use-client hook (⚠️ subpath export change)

22 Jun 12:13

Choose a tag to compare

  • Move stega util exports out of the useContentLink client hook d896f9a (#120)

⚠️ Breaking change for react-datocms/use-content-link imports

This release fixes a bug where stripStega/decodeStega/revealStega couldn't run in React Server / backend components: they were being re-exported from a 'use client' hook, which tainted them as client-only.

As part of the fix, these utilities were moved out of the react-datocms/use-content-link subpath and are now re-exported only from the package barrel (react-datocms):

// ❌ No longer works as of 8.0.4 (worked in 8.0.3)
import { stripStega } from 'react-datocms/use-content-link';
//   error TS2305: Module '"react-datocms/use-content-link"' has no exported member 'stripStega'

// ✅ From the barrel
import { stripStega } from 'react-datocms';

// ✅ Recommended for client components that want to avoid pulling in
//    the rest of the barrel (e.g. @mux / VideoPlayer): import the pure,
//    dependency-free stega utils straight from the underlying package
import { stripStega } from '@datocms/content-link/stega';

The react-datocms/use-content-link subpath now exposes only the useContentLink hook (and a stripStega: boolean option on UseContentLinkOptions, which is unrelated to the removed function).

We acknowledge this should ideally have been a major version bump — apologies for shipping it under a patch. If you adopted the "Responsive Images — automatic sizes" update (which prompts upgrading react-datocms), this is the change that may have touched your stega imports.

v8.0.3...v8.0.4

v8.0.3

14 May 12:08

Choose a tag to compare

  • Expose revealStega utility from @datocms/content-link c8ef52a
  • Rename SRCImage to RSCImage (with deprecated alias for back-compat) 5d12722

v8.0.2...v8.0.3

v8.0.1

23 Mar 11:50

Choose a tag to compare

  • Upgrade @datocms/content-link to 0.3.19 and expose hue prop b641d25

Full Changelog: v8.0.0...v8.0.1

v8.0.0

25 Feb 08:58

Choose a tag to compare

Breaking change: @mux/mux-player-react is now an optional peer dependency

Previously, react-datocms bundled @mux/mux-player-react as a direct dependency with a "*" version range. This caused issues where package managers could resolve to outdated versions of the Mux player, leading to subtitles/closed captions not loading on Chrome.

Starting with v8.0.0, @mux/mux-player-react is declared as an optional peer dependency.

How to upgrade

If you use <VideoPlayer />, add @mux/mux-player-react to your project's dependencies:

npm install @mux/mux-player-react

We recommend version 3.11.4 or later, which includes the Chrome subtitles fix.

If you don't use <VideoPlayer />, no action is needed — the Mux player package will no longer be pulled into your bundle at all.

Why this change?

  • Fixes subtitles not loading on Chrome (forum thread)
  • Gives you control over which Mux player version you use
  • Reduces bundle size for projects that don't use <VideoPlayer />

v7.2.10

26 Jan 08:09

Choose a tag to compare

  • Fix hoverOnly type compatibility with controller 753293c
  • Add hoverOnly option to ClickToEditOptions 6600000

v7.2.9...v7.2.10

v7.2.9

25 Jan 09:46

Choose a tag to compare

  • Allow enableClickToEdit prop to accept false value 998b67e

v7.2.8...v7.2.9

v7.2.7

23 Jan 14:44

Choose a tag to compare

  • Add content link support to VideoPlayer ca2b4fe
  • Update ContentLink documentation with stripStega details 8ada688
  • Update ContentLink documentation with stripStega details 2276cf7

v7.2.6...v7.2.7