Skip to content

Releases: Shopify/hydrogen-v1

v0.7.0

22 Nov 14:24
Compare
Choose a tag to compare

Hydrogen v0.7.0 includes a number of bug fixes, a new response.redirect() API, and other various improvements.

Important: Read the upgrade guide below for migrating your existing Hydrogen apps to v0.7.0.

What's Changed

New response.redirect() API

You can perform redirects on initial SSR page loads by calling response.redirect(url: string, code?: number).

Read the docs about response.redirect

Note: This will only work with initial SSR page responses. Subsequent SPA-style navigations are not yet supported with redirects.

Upgrade guide

If you have an existing Hydrogen app:

First, yarn add @shopify/hydrogen or NPM equivalent to get the latest version

Next, update your server.js file to use the named export of Hydrogen Middleware:

-const hydrogenMiddleware = require('@shopify/hydrogen/middleware').default;
+const {hydrogenMiddleware} = require('@shopify/hydrogen/middleware');

In your pages/products/[handle].server.jsx and any other place where you're using ProductProviderFragment, add the new required variable $includeReferenceMetafieldDetails:

const QUERY = gql`
  query product(
    $country: CountryCode
    $handle: String!
+   $includeReferenceMetafieldDetails: Boolean = true
    # ...

Finally, update any locations where you're using <AddToCartButton> or <SelectedVariantAddToCartButton> to use variantId instead of variantID:

-<AddToCartButton variantID={selectedVariant.id} />
+<AddToCartButton variantId={selectedVariant.id} />

New Contributors

Full Changelog: Shopify/hydrogen@v0.6.4...v0.7.0

v0.6.4

11 Nov 08:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: Shopify/hydrogen@v0.6.3...v0.6.4

v0.6.3

10 Nov 05:45
Compare
Choose a tag to compare

What's Changed

Full Changelog: Shopify/hydrogen@v0.6.2...v0.6.3

v0.6.2

10 Nov 03:48
Compare
Choose a tag to compare

What's Changed

Full Changelog: Shopify/hydrogen@v0.6.1...v0.6.2

How to Upgrade Your Template

This release contains changes to the starter template that fix some general issues. If you already have a project created, follow these steps to upgrade:

  1. Move Money from server to client components.
  2. Move LocalizationProvider from App.server.jsx to Layout.server.jsx.
  3. Remove client component re-exports since these are no longer needed.

v0.6.1

08 Nov 13:46
Compare
Choose a tag to compare

What's Changed

Full Changelog: Shopify/hydrogen@v0.6.0...v0.6.1

v0.6.0

05 Nov 22:53
Compare
Choose a tag to compare

Introducing Hydrogen: our new React-based web development framework to build custom storefronts powered by Shopify

HELLO_HYDROGEN.mp4

Create innovative shopping experiences bringing the best out of the intersection between commerce, UX, and dev experience.

At Shopify Unite 2021, we shared a preview of Hydrogen. Today, the developer preview of Hydrogen is available. We’d love for you to try it out and help make it better by giving us your feedback.

⚡ Experiment on StackBlitz: https://hydrogen.new
🚀 Explore Hydrogen and start building with us today: https://shopify.dev/custom-storefronts/hydrogen
🎁 Give us the gift of feedback.
📍 Check out Hydrogen examples on Github.

New Contributors

Full Changelog: https://github.com/Shopify/hydrogen/commits/v0.6.0