Skip to content

Releases: datocms/react-datocms

v7.0.1

23 Jun 04:37
Compare
Choose a tag to compare
  • SRCImage className/style is now imgClassName/imgStyle. Introduce pictureClassName/pictureStyle. 0ef7657

v7.0.0...v7.0.1

v7.0.0

23 Jun 04:03
Compare
Choose a tag to compare
  • <Image> pictureClassName/pictureStyle props now control the <picture> tag instead of the <img> tag. For the <img> tag, you can use the new props imgClassName/imgStyle. bcab174

v6.0.6...v7.0.0

v6.0.6

12 Jun 13:45
Compare
Choose a tag to compare

v6.0.5...v6.0.6

v6.0.5

06 Jun 13:19
Compare
Choose a tag to compare
  • Fix TS errors on <StructuredText /> data prop f17790d

v6.0.4...v6.0.5

v6.0.4

05 Jun 09:28
Compare
Choose a tag to compare

v6.0.3

31 May 15:55
Compare
Choose a tag to compare
  • Fix regression on bgColor b93bfba

v6.0.2...v6.0.3

v6.0.2

27 May 14:02
Compare
Choose a tag to compare

v6.0.1...v6.0.2

v6.0.1

10 Apr 14:52
Compare
Choose a tag to compare

v6.0.0

03 Apr 07:40
Compare
Choose a tag to compare

Introducing server component

Now that both loading=lazy and aspect-ratio are broadly supported (> 93% of browsers) we can avoid complex JS to achieve lazy-loaded images with placeholders!

<SRCImage /> is a React Server Component, so it can be rendered and optionally cached on the server. It doesn't create any JS footprint. It generates a single <picture /> element and implements lazy-loading using the native loading="lazy" attribute. The placeholder is set as the background to the image itself.

Be careful: the placeholder is not removed when the image loads, so it's not recommended to use this component if you anticipate that the image may have an alpha channel with transparencies.

Major changes to <Image /> component:

  • removed lazyLoad prop: lazy loading is automatically disabled for images using priority

Other

All the examples have been consolidated into a single SPA React application to ensure a straightforward maintenance process: https://react-datocms-example.netlify.app/

v5.0.3...v6.0.0

v5.0.2

15 Mar 17:47
Compare
Choose a tag to compare
  • Better types for toRemixMeta 9076c2d

v5.0.0...v5.0.2