npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dotdev-joel/hydrogen-react

v2023.7.0

Published

React components, hooks, and utilities for creating custom Shopify storefronts

Downloads

2

Readme

Hydrogen React

Hydrogen React is an unopinionated and performant library of Shopify-specific commerce components, hooks, and utilities. Bring the best parts of Hydrogen to more React frameworks, like Next.js and Gatsby, and accelerate headless development using Shopify’s pre-built React components including Cart, Shop Pay, and Shopify Analytics.

📚 Overview | 🛠️ Docs | 🛍️ Custom Storefronts at Shopify | 🗣 Discord | 📝 Changelog

IMPORTANT: Refer to how this package is versioned.

This document contains the following topics:

Getting started

  • Run one of the following commands:

    npm:

    npm i --save @shopify/hydrogen-react

    Yarn:

    yarn add @shopify/hydrogen-react

Browse our overview and docs to learn more.

Improving the Developer Experience

hydrogen-react includes several tools that improve the developer experience, such as:

Development and production bundles

Hydrogen React has a development bundle and a production bundle. The development bundle has warnings and messages that the production bundle doesn't.

Depending on the bundler or runtime that you're using, the correct bundle might be automatically chosen following the package.json#exports of Hydrogen React. If not, then you might need to configure your bundler / runtime to use the development and production conditions.

Note: The production bundle is used by default if your bundler / runtime doesn't understand the export conditions.

Hydrogen React in the browser

Hydrogen React has a development umd build and a production umd build. Both are meant to be used directly either by <script src=""></script> tags in HTML or by AMD-compatible loaders.

If you're using Hydrogen React as a global through the <script> tag, then the components can be accessed through the hydrogenreact global variable.

Troubleshooting

The following will help you troubleshoot common problems in this version of Hydrogen React.

GraphQL autocompletion

If you can't get GraphQL autocompletion to work, then try restarting the GraphQL server in your IDE.

For example, in VSCode do the following:

  1. Open the command palette.
  2. Type graphql.
  3. Select VSCode GraphQL: Manual Restart.

Contributing

We love contributions! Contributing works best when you first confirm that something needs to be changed or fixed; please open an issue, start a discussion, or talk to us in Discord!

PRs are welcome! Be sure to read the CONTRIBUTING.md for an overview and guidelines to help your PR succeed.