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

@changerawr/react

v0.1.0

Published

Headless React SDK for Changerawr - changelog management system

Readme

@changerawr/react

A headless React SDK for interacting with Changerawr - the modern changelog management system.

Features

  • 🔄 Full TypeScript support
  • 🎣 React hooks for all Changerawr API endpoints
  • 🎮 Complete control over UI implementation
  • 🧩 Modular architecture - use only what you need
  • 🚀 Optimized for performance and bundle size
  • 📚 Comprehensive documentation

Installation

# npm
npm install @changerawr/react

# yarn
yarn add @changerawr/react

# pnpm
pnpm add @changerawr/react

Quick Start

import { ChangerawrProvider, useChangelog } from '@changerawr/react';

// Wrap your app with the provider
function App() {
  return (
    <ChangerawrProvider
      apiUrl="https://your-changerawr-instance.com/api"
      projectId="your-project-id"
      // Optional: API key for authenticated operations
      apiKey="your-api-key"
    >
      <ChangelogContainer />
    </ChangerawrProvider>
  );
}

// Use the hooks in your components
function ChangelogContainer() {
  const { 
    data: entries,
    isLoading,
    error,
    fetchNextPage,
    hasNextPage 
  } = useChangelog({
    limit: 10,
    sort: 'newest'
  });

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return (
    <div>
      {entries?.map(entry => (
        <div key={entry.id}>
          <h2>{entry.title}</h2>
          <p>{entry.content}</p>
          <div>
            {entry.tags.map(tag => (
              <span key={tag.id}>{tag.name}</span>
            ))}
          </div>
        </div>
      ))}
      
      {hasNextPage && (
        <button onClick={() => fetchNextPage()}>
          Load more
        </button>
      )}
    </div>
  );
}

Available Hooks and Components

Hooks

// Projects
const { data: projects } = useProjects();
const { data: project } = useProject('project-id');
const { createProject } = useCreateProject();
const { updateProject } = useUpdateProject('project-id');
const { deleteProject } = useDeleteProject('project-id');

// Changelog entries
const { data: entries } = useChangelog('project-id');
const { data: entry } = useChangelogEntry('project-id', 'entry-id');
const { createEntry } = useCreateEntry('project-id');
const { updateEntry } = useUpdateEntry('project-id', 'entry-id');
const { deleteEntry } = useDeleteEntry('project-id', 'entry-id');
const { publishEntry, unpublishEntry } = usePublishEntry('project-id', 'entry-id');

// Tags
const { data: tags } = useTags('project-id');
const { selectedTags, toggleTag } = useTagFilter();

// Subscriptions
const { subscribe } = useSubscribe('project-id');
const { data: subscribers } = useSubscribers('project-id');
const { unsubscribe } = useUnsubscribe();

// Email
const { data: emailConfig } = useEmailConfig('project-id');
const { updateConfig } = useUpdateEmailConfig('project-id');
const { sendEmail } = useSendEmail('project-id');

// Widget
const { script } = useWidgetScript('project-id');

Components

Subscription Form

import { ChangerawrProvider, SubscriptionForm } from '@changerawr/react';

function NewsletterSection() {
  return (
    <ChangerawrProvider
      apiUrl="https://your-changerawr-instance.com/api"
      projectId="your-project-id"
    >
      <div className="newsletter-section">
        <h2>Stay Updated</h2>
        <p>Subscribe to our changelog to get the latest updates.</p>
        
        <SubscriptionForm 
          className="custom-form"
          showSubscriptionType={true}
          emailLabel="Your Email"
          nameLabel="Your Name"
          submitButtonText="Keep Me Updated"
          onSuccess={() => {
            // Analytics tracking or other side effects
            console.log('Subscription successful!');
          }}
        />
      </div>
    </ChangerawrProvider>
  );
}

Widget Components

import { 
  ChangerawrProvider, 
  ChangerawrWidget, 
  ChangerawrWidgetTrigger 
} from '@changerawr/react';

function AppFooter() {
  // Generate a unique ID for the trigger
  const widgetTriggerId = "changelog-trigger";
  
  return (
    <footer>
      <div className="footer-links">
        {/* Other footer content */}
        
        {/* Custom trigger button */}
        <ChangerawrWidgetTrigger
          id={widgetTriggerId}
          className="footer-button"
        >
          Recent Updates
        </ChangerawrWidgetTrigger>
        
        {/* Popup widget that uses the trigger */}
        <ChangerawrWidget
          projectId="your-project-id"
          isPopup={true}
          position="bottom-right"
          theme="dark"
          trigger={widgetTriggerId}
          maxEntries={5}
        />
      </div>
    </footer>
  );
}

Development

Setup

  1. Clone the repository

    git clone https://github.com/changerawr/react.git
    cd react
  2. Install dependencies

    npm install
  3. Start development build

    npm run dev

Scripts

  • npm run build - Build the package
  • npm run dev - Build with watch mode
  • npm run lint - Lint the code
  • npm test - Run tests
  • npm run test:watch - Run tests in watch mode
  • npm run clean - Clean build artifacts

Testing Your Changes

You can use npm link to test your changes locally:

# In the SDK directory
npm run build
npm link

# In your project directory
npm link @changerawr/react

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.