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

@nexly/react-web

v0.16.2

Published

React bindings for Nexly (@nexly/web): provider, client hook, engagement, optional auto pageview

Readme

@nexly/react-web

React bindings for @nexly/core.

Install

npm install @nexly/react-web react

@nexly/core is installed automatically as a dependency of @nexly/react-web.

Usage

import { NexlyProvider, useNexlyClient } from '@nexly/react-web'

function Root() {
  return (
    <NexlyProvider
      appId={appId}
      ingestKey={apiToken}
      autoPageView
      autoEngagement
    >
      <App />
    </NexlyProvider>
  )
}

function App() {
  const client = useNexlyClient()
  if (!client) return <p>Add credentials</p>
  return (
    <button type="button" onClick={() => client.customEvent('cta_clicked', { placement: 'hero' })}>
      Track
    </button>
  )
}

NexlyProvider props

  • appId, ingestKey — required strings (ingestKey is the ingest API token; not named key because that is reserved in React).
  • autoPageView (default false) — when a client exists, send one pageview on mount.
  • autoEngagement (default false) — when true and a client exists (all three strings non-empty after trim), attach engagement listeners; otherwise no-op. Cleanup on unmount or when the client or flag changes. The underlying startEngagement() is idempotent, so double-mounts (StrictMode, HMR) don't produce duplicate listeners.

Opting elements out of auto-capture

Mark any element with data-nexly-ignore to skip auto-click and auto-input_focus events for it (and its descendants). Use it on elements where you already emit your own event(...) to avoid semantic duplicates:

<button data-nexly-ignore onClick={() => client?.customEvent('signup_clicked')}>
  Sign up
</button>

useNexlyClient()

Returns Nexly | null inside a provider (null if any credential trims to empty).

Using outside React (plain functions)

The provider initializes a global singleton. Access it anywhere without hooks:

import { Nexly } from '@nexly/react-web'

Nexly.getInstance()?.customEvent('cta_click', { placement: 'hero' })

Next.js

For Next.js App Router (route-aware autoPageView on every navigation), use @nexly/next instead.

License

MIT — see LICENSE.