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

@fullstory/react-library

v2.0.0

Published

This component library assists in fullstory set up for react apps

Readme

Fullstory React Library

This is a component library that encourages developers to build with components suped up with Fullstory functionality.

Installation

npm install @fullstory/react-library

Peer Dependencies

This library requires the following peer dependencies:

  • react v18 or v19
  • react-router v6+
  • @fullstory/browser v2+

Migration Guide

v1 → v2: react-router-domreact-router

v2 is a breaking change for apps on React Router v5 or earlier.

What changed: The peer dependency was updated from react-router-dom to react-router to align with the package structure introduced in React Router v6, where core routing APIs live in react-router and react-router-dom is a thin DOM-specific wrapper.

Required minimum version: React Router v6.

If you are on React Router v6: No changes needed beyond upgrading this library. react-router-dom re-exports everything from react-router, so your existing app imports are unaffected.

If you are on React Router v5: Install the React Router v5→v6 compatibility layer to migrate incrementally before upgrading to v2 of this library.

Page Names and Properties

1. Default Configuration

The default configuration will capture all of the information in the url, meta tags, and schemas. The page name by default comes from the url path.

Implementation:

Wrap your Routes with <FullStoryProvider> like so

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

2. Url Configuration

The url configuration will set page names and properties according to the url. It will set configure the pageName from the path and properties from the search.

Implementation:

Add the capture rule of url to your FullStoryProvider.

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider defaultCaptureRules={["url"]}>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

3. Meta Configuration

The meta configuration will capture all of the information in the meta tags. It will configure the pageName from the title tag in the head.

Implementation:

Add the capture rule of meta to your FullStoryProvider.

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider defaultCaptureRules={["meta"]}>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

4. Schema Configuration

The schema configuration will capture all of the information in the schemas on the page. It will configure the pageName from the url path.

Implementation:

Add the capture rule of schema to your FullStoryProvider.

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider defaultCaptureRules={["schema"]}>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

5. Multi Capture Configuration

Multi Capture Configuration will by default capture information from certain aspects of the page.

Implementation:

Add the capture rules you would like to your FullStoryProvider.

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider defaultCaptureRules={["url", "schema"]}>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

6. Singular Page Capture Rules

Additionally, we can override the default capture rules by adding capture rules to specific pages.

Implementation:

Add the capture rules by defining the page and the rule you expect to FullStoryProvider.

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider defaultCaptureRules={["url"]} pageCaptureRules={{"dashboard": ["schema", "meta"]}}>
      <Routes>
        <Route path="/" element={<HomePage />}/>
        <Route path="/dashboard" element={<Dashboard />}/>
      </Routes>
    </FullStoryProvider>
  )
}

7. useFSNavigate Configuration

If you would like FullStory to capture custom pagenames and properties we can use the hook useFSNavigate(). The page name will be set to your custom pagename and the custom properties will be added to the properties captured by the default configuration or page configuration rules.

Implementation:

import { FullStoryProvider } from "@fullstory/react-library";

const App = () => {
  return (
    <FullStoryProvider>
      <Routes>
        {...}
      </Routes>
    </FullStoryProvider>
  )
}

Then we can use the hook anywhere within the provider like this:

import { useFSNavigate } from "@fullstory/react-library";

const Button = (props) => {
  const { property } = props
  const nav = useFSNavigate()

  return (
    <button onClick={() => nav("/", "Home Page", {property_1: property})}>
      Home Page
    </button>
  )
}