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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@storesynk/hydrogen

v0.1.0-beta.13

Published

Storesynk widgets inside an existing classic Hydrogen (React Router) storefront: a cart bridge onto the storefront's own CartForm route, and a zero-config embed.

Readme

@storesynk/hydrogen

Storesynk widgets inside an existing classic Hydrogen storefront (React Router, createCartHandler, CartForm), without converting it. A volume discount, a bundle, a build-your-own-box or product add-ons render in your markup and add to your cart.

Classic Hydrogen only. A storefront on the Hydrogen developer preview toolkit already ships the standard cart actions: use @storesynk/react/embed there, no bridge needed.

Install

npm install @storesynk/hydrogen

Pre-1.0 prereleases (0.1.0-beta.N) are published to npm's latest tag, so a plain install gets the current release. Do not install @beta: that dist-tag is frozen at an old build.

1. The cart bridge, once

Classic Hydrogen has no window.Shopify.actions; every cart write is a form POST to your cart route. <StoresynkCartBridge> turns a widget's add into your own CartForm submission, sent through a React Router fetcher, so your optimistic cart, header count and cart aside update as if your own button had been clicked.

It needs to open your cart aside, and useAside is your template's own code, so give it a three-line home inside <Aside.Provider>:

// app/components/PageLayout.jsx
import {StoresynkCartBridge} from '@storesynk/hydrogen';
import {Aside, useAside} from '~/components/Aside';

function StoresynkBridge() {
  const {open} = useAside();
  return <StoresynkCartBridge onAddToCart={() => open('cart')} />;
}

// inside <Aside.Provider>:
<StoresynkBridge />

Props: route (default /cart), onAddToCart(result), onError(error).

The bridge also makes your storefront dispatch the standard shopify:cart:lines-update event for every cart write, your own buttons included. That is what lets the add-ons widget ride along with your add-to-cart button.

2. A widget

// app/routes/products.$handle.jsx
import {StoresynkEmbed} from '@storesynk/hydrogen';

<StoresynkEmbed handle={product.handle} variantId={selectedVariant?.id}>
  {/* widget markup from the Storesynk docs, unchanged */}
</StoresynkEmbed>

No token prop: the store domain, the public Storefront token and the locale come from your root loader, which the Hydrogen skeleton already sends to the browser (publicStoreDomain, consent.storefrontAccessToken, consent.country, consent.language). Pass token / domain explicitly if your root loader differs.

className works on the Storesynk tags even on React 18.

Deal names in your cart

import {StoresynkLineDeals} from '@storesynk/hydrogen';

<StoresynkLineDeals line={line} locale="en-US" />

Add discountAllocations to your CART_QUERY_FRAGMENT first. See the docs guide.