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

@chimeric/react

v2.1.0

Published

React utilities for chimeric interfaces

Readme

@chimeric/react

React-specific factory functions for the chimeric library — providing ready-to-use implementations with built-in state management, retry logic, and error handling.

Installation

npm install @chimeric/react

Requires React 18+ as a peer dependency. Automatically includes @chimeric/core.

Overview

@chimeric/react provides factory functions that create fully-implemented chimeric operations for React. Unlike @chimeric/core which provides low-level types and fusion utilities, this package includes actual React hook implementations with:

  • Built-in state management (useState)
  • Automatic retry with exponential backoff
  • Loading/error/success state tracking
  • Server component support via separate server entry point

Factory Functions

ChimericAsyncFactory

Creates an async operation usable both idiomatically and reactively.

import { ChimericAsyncFactory } from '@chimeric/react';

const fetchUser = ChimericAsyncFactory(async (params: { id: string }) => {
  const response = await fetch(`/api/users/${params.id}`);
  return response.json();
});

// Idiomatic
const user = await fetchUser({ id: '123' }, { options: { retry: 3 } });

// Reactive (in a React component)
const { invoke, data, isPending, isError, error } = fetchUser.useHook();

const handleFetch = () => invoke({ id: userId });

ChimericEagerAsyncFactory

Creates an async operation that auto-executes when params change.

import { ChimericEagerAsyncFactory } from '@chimeric/react';

const fetchUser = ChimericEagerAsyncFactory({
  eagerAsyncFn: async (params: { id: string }) => {
    const response = await fetch(`/api/users/${params.id}`);
    return response.json();
  },
});

// Idiomatic
const user = await fetchUser({ id: '123' });

// Reactive — auto-executes on mount and when params change
const { data, isPending, isError, error } = fetchUser.useHook(
  { id: userId },
  { options: { enabled: !!userId } },
);

CreateChimericSyncFactory

Creates a factory bound to a state management library (Redux, Zustand, etc.) via an adapter.

import { CreateChimericSyncFactory } from '@chimeric/react';

const ChimericSyncFactory = CreateChimericSyncFactory({
  getState: () => store.getState(),
  useSelector: useAppSelector,
});

const getTodoById = ChimericSyncFactory({
  selector: (params: { id: string }) => (state) => state.todos.find((t) => t.id === params.id),
});

// Idiomatic
const todo = getTodoById({ id: '123' });

// Reactive
const todo = getTodoById.useHook({ id: '123' });

MetaAggregatorFactory

Aggregates multiple reactive states into a single state object.

import { MetaAggregatorFactory } from '@chimeric/react';

const aggregated = MetaAggregatorFactory(
  [userResult, postsResult, settingsResult],
  ([userData, postsData, settingsData]) => ({
    user: userData,
    posts: postsData,
    settings: settingsData,
  }),
);

// aggregated.isPending — true if ANY are pending
// aggregated.isSuccess — true if ALL are successful
// aggregated.data — combined result from reducer

ChimericSyncReducer

Combines multiple ChimericSync services into a single derived ChimericSync.

import { ChimericSyncReducer } from '@chimeric/react';

const getDashboardData = ChimericSyncReducer<void>().build({
  serviceList: [{ service: getCurrentUser }, { service: getNotificationCount }],
  reducer: ([user, count]) => ({ user, unread: count }),
});

// Idiomatic
const data = getDashboardData();

// Reactive
const data = getDashboardData.useHook();

IdiomaticSyncReducer and ReactiveSyncReducer are also available for single-path usage.

Server Components

This package uses the react-server export condition. When your bundler resolves imports for a server component, it automatically uses a server-safe build where hooks throw descriptive errors if accidentally called. No separate import path is needed — the same import { ... } from '@chimeric/react' works in both server and client contexts.

Development

npx nx build @chimeric/react
npx nx test @chimeric/react