<Back to Updates

June 2024 Release: Optimistic cart, RichText component, stable analytics

June 5, 2024

Welcome to Hydrogen's June 2024 release!

In case you missed it - Remix v3 is now going to be released as React Router v7. That means Hydrogen will be built on the most widely used and stable building blocks of the modern JS web. We’re looking forward to adopting these updates in a future release as they continue to push the web forward.

Let’s get into what’s new for June.

Optimistic cart

Hydrogen now provides optimistic cart support out of the box with the new useOptimisticCart hook. Cart actions like add, update and remove are reflected instantly, boosting perceived performance.

Upgrade with just a few lines of code - see the upgrade guide in the release notes.

A new rich text component

Hydrogen now has support for Rich Text metafields out of the box with the <RichText /> component — making it simple to render metafields as HTML, and gives you full control over the markup so you can leverage your existing design system with Rich Text nodes.

Analytics is now stable

Implementing analytics with Hydrogen is simpler, more reliable, and more extensible. Rolled out as unstable in our April release, the new analytics DX is now stable. The new Analytics components are now included by default in new Hydrogen projects, and works out of the box with the Customer Privacy API and Shopify’s built-in cookie consent banner.

Updates, optimizations, and fixes

As always, this month’s release brings you a range of additional optimizations, bug fixes, and quality-of-life tweaks:

  • Update Remix to 2.9.2 (#2135)
  • Auto-optimize dependencies in development (#2106)
  • Support Vite projects with the debug cpu command (#2124)
  • Fix storefrontRedirect to strip trailing slashes when querying for redirects (#2110)
  • Improve VariantSelector to return variant object in option values (#2099 — thanks @NabeelAhmed1721!)

To take advantage of all the latest features and improvements in Hydrogen, just run npx shopify hydrogen upgrade. That’s it for the June release — see you in July!

Get building

Spin up a new Hydrogen app in minutes.

See documentation