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

@thaon/react.party

v1.0.0

Published

A simple and lean multiplayer integration for React

Readme

react.party

A multiplayer framework for React

React.party is inspired (and also a modified fork) of the amazing p5.party!

Following the same principles, it aims to enable multiplayer functionality in React applications in the cleanest and easiest way possible.

It relies on a Deepstream server for communication and uses WebSockets.

Installation

To use this library, first, ensure you have NodeParty and its dependencies set up in your project. Then, add this library to your project:

npm install react.party

Usage

Connecting to a NodeParty Server

To connect to a NodeParty server and manage real-time user connections, use the useConnect hook.

import React from "react";
import { useConnect } from "path-to-useParty";

function App() {
  const isConnected = useConnect({
    url: "wss://yourserver.com", // WebSocket server URL, this is optional as it defaults to the react.party test server
    app: "YourAppName", // Application name
    room: "YourRoomName", // Room name
  });

  return <div>{isConnected ? "Connected to NodeParty" : "Connecting..."}</div>;
}

Synchronizing Shared State

To synchronize a shared state across clients, use the useSync hook.

import React from "react";
import { useSync } from "path-to-useParty";

function SharedCounter() {
  const setup = { name: "counter", initialValues: { count: 0 } };
  const sharedCounter = useSync(setup, (newState) => {
    console.log("New counter state:", newState);
  });

  return <div>Current count: {sharedCounter?.count || 0}</div>;
}

Managing Personal and Others' States

For personal state management and listening to others' state changes, use useMine and useOthers hooks respectively.

import React from "react";
import { useMine, useOthers } from "path-to-useParty";

function PersonalState() {
  const myState = useMine({ myKey: "initialValue" }, (newState) => {
    console.log("My new state:", newState);
  });

  // Use `useOthers` similarly to listen to others' state changes.
  const othersState = useOthers((newState) => {
    console.log("Others new state:", newState);
  });

  return (
    <div>
      My state: {JSON.stringify(myState)}
      <br />
      Others state: {JSON.stringify(othersState)}
    </div>
  );
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your improvements or suggestions.

License

This library is licensed under MIT, see the LICENSE file for details.