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

@reliableapp/react

v1.0.9

Published

Reliable browser SDK — React bindings (Provider, ErrorBoundary, hooks, router).

Downloads

1,368

Readme

@reliableapp/react

React bindings for @reliableapp/frontend-core. Adds <ReliableProvider>, <ReliableErrorBoundary>, hooks, and router adapters — plus re-exports the full core API so you only need one package.

Built by Ziloris · Full documentation →


Install

npm install @reliableapp/react

React 18+ is required as a peer dependency.

Quick start

Wrap your app root with <ReliableProvider> and add <ReliableErrorBoundary> wherever you want crash reporting:

import { ReliableProvider, ReliableErrorBoundary } from '@reliableapp/react';

export default function RootLayout({ children }) {
  return (
    <ReliableProvider config={{ publicKey: 'pk_live_rl_...' }}>
      <ReliableErrorBoundary fallback={<p>Something went wrong.</p>}>
        {children}
      </ReliableErrorBoundary>
    </ReliableProvider>
  );
}

Components

<ReliableProvider>

Initializes the SDK once and exposes the client via context. Place this at the root of your app, outside any router.

<ReliableProvider
  config={{
    publicKey: 'pk_live_rl_...',
    sampleRate: 100,
    captureReplay: true,
  }}
>
  <App />
</ReliableProvider>

<ReliableErrorBoundary>

Catches render-phase crashes, reports them to Reliable with the full React component stack, and renders a fallback UI.

// Static fallback
<ReliableErrorBoundary fallback={<ErrorPage />}>
  <Dashboard />
</ReliableErrorBoundary>

// Render-prop fallback with reset
<ReliableErrorBoundary
  fallback={(error, reset) => (
    <div>
      <p>{error.message}</p>
      <button onClick={reset}>Try again</button>
    </div>
  )}
  onError={(error, info) => console.error(error, info)}
  tags={{ section: 'checkout' }}
>
  <CheckoutFlow />
</ReliableErrorBoundary>

Hooks

useIdentify(user)

Calls identify() on mount and whenever user.externalId changes. Pass null when the user isn't logged in.

function App() {
  const { user } = useAuth();
  useIdentify(user ? { externalId: user.id, email: user.email } : null);
  return <Routes />;
}

useCaptureException() / useCaptureMessage()

Stable references to the manual capture functions — safe to put in dependency arrays.

const captureException = useCaptureException();

async function handleSubmit() {
  try {
    await submitOrder();
  } catch (err) {
    captureException(err, { severity: 'high', tags: { flow: 'checkout' } });
  }
}

useAddBreadcrumb()

const addBreadcrumb = useAddBreadcrumb();

function StepWizard() {
  const goToStep = (step: number) => {
    addBreadcrumb({ category: 'ui', message: `step ${step}`, level: 'info' });
    setStep(step);
  };
}

useSetTag() / useSetTags()

Attach tags to all future events from this session.

const setTag = useSetTag();
useEffect(() => { setTag('plan', user.plan); }, [user.plan]);

useReliable()

Returns the raw ReliableClient from context if you need direct access.

const client = useReliable();
client?.flush();

Router adapters

useReliableRouter(pathname) — generic

Works with any router. Pass the current pathname string.

// React Router v6
import { useLocation } from 'react-router-dom';
import { useReliableRouter } from '@reliableapp/react';

function RouterSync() {
  const { pathname, search } = useLocation();
  useReliableRouter(pathname + search);
  return null;
}
// Next.js App Router — add to your root layout
'use client';
import { usePathname, useSearchParams } from 'next/navigation';
import { useReliableRouter } from '@reliableapp/react';

export function ReliableRouterSync() {
  const pathname = usePathname();
  const searchParams = useSearchParams();
  useReliableRouter(pathname + (searchParams.toString() ? '?' + searchParams.toString() : ''));
  return null;
}

useReliableNextPagesRouter(router) — Next.js Pages Router

// pages/_app.tsx
import { useRouter } from 'next/router';
import { useReliableNextPagesRouter } from '@reliableapp/react';

export default function MyApp({ Component, pageProps }) {
  const router = useRouter();
  useReliableNextPagesRouter(router);
  return <Component {...pageProps} />;
}

Core API re-exports

You don't need to install @reliableapp/frontend-core separately — everything is re-exported:

import {
  init, getClient, identify,
  setTag, setTags, addBreadcrumb,
  flush, captureException, captureMessage,
} from '@reliableapp/react';

Docs: reliable.ziloris.com/docs · Built by: Ziloris