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

judgeme-hydrogen-fixed

v1.0.3

Published

Fixed version of @judgeme/shopify-hydrogen for Hydrogen/Oxygen. Fixes infinite refresh loops caused by installed.js and improper React hooks.

Readme

judgeme-hydrogen-fixed

A fixed version of @judgeme/shopify-hydrogen for Shopify Hydrogen/Oxygen that eliminates infinite refresh loops and improper React hook usage.

Why This Package?

The official @judgeme/shopify-hydrogen package has critical bugs that make it unusable in production:

  1. Infinite render loop - useEffect with no dependency array runs on every render
  2. Refresh loop on Oxygen - installed.js causes page refreshes in production deployments

This package fixes both issues while maintaining full compatibility with Judge.me widgets.

Installation

npm install judgeme-hydrogen-fixed

Usage

1. Add the Hook to Your Root Component

Add useJudgeme to your root layout or App component:

// app/root.tsx
import { useJudgeme } from 'judgeme-hydrogen-fixed';

export default function App() {
  useJudgeme({
    shopDomain: 'your-store.myshopify.com',
    publicToken: 'your-judge-me-public-token',
    cdnHost: 'https://cdn.judge.me',
    delay: 500, // optional, defaults to 500ms
  });

  return (
    <html>
      {/* ... */}
    </html>
  );
}

2. Add Widget Components

Preview Badge (Star Rating)

Display star ratings on product cards or near product titles:

import { JudgemePreviewBadge } from 'judgeme-hydrogen-fixed';

function ProductCard({ product }) {
  return (
    <div>
      <h2>{product.title}</h2>
      <JudgemePreviewBadge
        id={product.id}
        productTitle={product.title}
        productHandle={product.handle}
      />
    </div>
  );
}

Review Widget (Full Reviews Section)

Display the complete reviews section on product pages:

import { JudgemeReviewWidget } from 'judgeme-hydrogen-fixed';

function ProductPage({ product }) {
  return (
    <div>
      {/* Product content */}
      
      <JudgemeReviewWidget
        id={product.id}
        productTitle={product.title}
        productHandle={product.handle}
        productImageUrl={product.featuredImage?.url}
        productDescription={product.description}
      />
    </div>
  );
}

Available Components

| Component | Description | |-----------|-------------| | JudgemePreviewBadge | Star rating badge for product cards | | JudgemeReviewWidget | Full review widget with reviews list and write review form | | JudgemeCarousel | Review carousel widget | | JudgemeReviewsTab | Reviews tab widget | | JudgemeAllReviewsRating | Overall rating display across all products | | JudgemeVerifiedBadge | Verified badge for social proof | | JudgemeAllReviewsCount | Total reviews count across all products | | JudgemeMedals | Store medals/badges widget |

How It Works

The Problem with installed.js

The official Judge.me package loads installed.js which performs automatic initialization. On Shopify Oxygen (and other edge deployments), this script causes infinite page refresh loops.

Our Solution

  1. No installed.js - We don't load the problematic bootstrap script
  2. Direct preloader call - Widgets are initialized by calling jdgm_preloader() directly
  3. Smart retry mechanism - Waits for widget elements to appear in DOM before initializing
  4. Proper React hooks - Correct dependency arrays prevent infinite render loops
  5. Route change handling - Widgets re-initialize on client-side navigation

Configuration Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | shopDomain | string | Yes | - | Your Shopify store domain | | publicToken | string | Yes | - | Your Judge.me public token | | cdnHost | string | Yes | - | Judge.me CDN host (usually https://cdn.judge.me) | | delay | number | No | 500 | Delay (ms) before re-rendering widgets on route change |

TypeScript Support

Full TypeScript support is included. All components and the hook are fully typed.

import type {
  UseJudgemeConfig,
  JudgemePreviewBadgeProps,
  JudgemeReviewWidgetProps,
} from 'judgeme-hydrogen-fixed';

Finding Your Judge.me Credentials

  1. Log in to your Judge.me dashboard
  2. Go to Settings > Technical
  3. Find your Public Token and Shop Domain
  4. The CDN host is typically https://cdn.judge.me

License

MIT © Ben Goodman

Links