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

@guidelytech/react

v0.8.0

Published

React provider and hooks for Guidely

Readme

@guidelytech/react

React provider and hooks for Guidely. Wraps @guidelytech/sdk-core; works with React 18/19, SSR and Strict Mode.

pnpm add @guidelytech/react
import { GuidelyProvider, useGuidely } from "@guidelytech/react";

export function App({ children }) {
  return (
    <GuidelyProvider projectId="pk_dev_…" apiUrl="http://localhost:3000" user={{ id: "u1", traits: { role: "admin" } }}>
      {children}
    </GuidelyProvider>
  );
}

function HelpMenu() {
  const guidely = useGuidely();
  return <button onClick={() => guidely.startGuide("new-user-onboarding")}>Restart tour</button>;
}

| Export | Description | |---|---| | GuidelyProvider | Accepts every GuidelyOptions field plus user?: { id, traits?, account? } and children. Creates the client inside an effect (never during SSR), destroys it on unmount; Strict Mode's double invoke yields exactly one live client. Changing projectId/environment/apiUrl recreates the client; changing user re-identifies (undefined resets). | | useGuidely() | The client, or a no-op proxy on the server / before mount (methods return false, [], null or resolved promises). | | useGuidelyReady() | true once config is loaded. | | useGuidelyIdentify(userId, traits?, account?) | Effect helper that identifies when the arguments change. | | useGuidelyEvent(event, handler) | Subscribes for the component lifetime (latest handler is used). | | useChecklistProgress(idOrKey) | Live { completedTaskIds, completedAt, dismissedAt }. | | useGuideState(idOrKey) | Live { active, completed, stepId, stepIndex, guide }. | | noopClient | The no-op client instance (flag getters return their fallbacks). | | useFlag(key, fallback = false) | Is the boolean flag on? | | useFeatureValue(key, fallback) | A flag's value (string, number, JSON); fallback when missing or of another type. | | useFlagDetails(key, fallback) | Value plus reason, ruleId, variationId, experiment. | | useFlags() / useFlagsReady() / useFlagsClient() | Every flag's value / loaded yet / the flags client (null on the server). | | <Feature flag="x" fallback={…}> (alias <FeatureFlag>) | Renders children when the flag is on, else fallback. | | <FeatureValue flag="x" value="green" fallback={…}> | Renders children when the flag's value equals value. | | <FlagsProvider sdkKey="pk_…" attributes={…} payload={…}> | Flags only, without guides or analytics (accepts every flags client option). |

Feature flags

import { Feature, useFeatureValue, useFlag } from "@guidelytech/react";

function Checkout() {
  const newCheckout = useFlag("new-checkout");
  const color = useFeatureValue("checkout-button-color", "blue");
  return (
    <Feature flag="new-dashboard-banner" fallback={<OldBanner />}>
      <NewBanner />
    </Feature>
  );
}

The hooks read the GuidelyProvider's client (client.flags, same public key, identity/page/device attributes maintained for you) or a <FlagsProvider>. They subscribe with useSyncExternalStore and re-render only when a value changes. Before the client exists (server rendering, hydration) they read the bootstrap payload — <GuidelyProvider flagsPayload={…} flagAttributes={…}> or <FlagsProvider payload={…}> — evaluated with flagAttributes plus the user prop (id, traits, account), so server HTML and hydration match; without a payload they return fallbacks. GuidelyProvider also accepts flags={false} to turn flags off or flags={{ … }} for client options.

Types re-exported: GuidelyClient, GuidelyOptions, GuidelyEvents, GuidelyUser, ChecklistProgressState, PublishedGuide, GuideState, GuidelyProviderProps, and from @guidelytech/flags: FlagsClient, FlagsClientOptions, FlagDetails, FlagsBootstrap, FlagsPayload, Attributes, JsonValue, EvaluationResult.