Overview
Hydrogen is Shopify’s solution for headless commerce. It provides developers with a set of tools, utilities, and examples for building performant commerce applications. While primarily designed to be used with Shopify’s full stack web framework Remix, Hydrogen also offers a portable React library that can be used with other supporting frameworks.
Features
- Opinionated tools: Hydrogen provides a set of opinionated tools for building a commerce application with Remix.
- Shopify-specific components: The Hydrogen React library offers a collection of Shopify-specific commerce components, hooks, and utilities.
- Integration with Shopify CLI: The Shopify CLI extension allows for seamless integration with Hydrogen.
- Project generation from the command line: Generate a new Hydrogen project using the command line.
- Automatic code generation: Hydrogen includes a codegen package that automatically generates types for Storefront API queries.
- Remix adapter: The Remix adapter enables Hydrogen to run on the Oxygen runtime.
- Local runtime for Hydrogen apps: The mini-oxygen package provides a local runtime environment that simulates the Oxygen production environment.
Installation
Requirements:
- Node.js version 16.14.0 or higher
- npm (or any other package manager of choice, such as yarn or pnpm)
To install the latest version of Hydrogen, run the following command in your terminal:
npm install @shopify/hydrogen
To run the local development server, use the following command:
npm run dev
Once the server is running, you can access your Hydrogen app at http://localhost:3000.
For more detailed documentation on Hydrogen, refer to the Hydrogen docs.
Summary
Hydrogen is Shopify’s stack for headless commerce, offering a range of tools and utilities for building dynamic and performant commerce applications. It provides opinionated tools for building with Remix, a React library for use with various frameworks, and integration with Shopify CLI. Hydrogen also includes packages for code generation, Remix adapter, and a local runtime environment.