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

@tanuden/kumoha-react

v0.4.2

Published

React hooks for Tanuden Kumoha theming engine

Readme

GitHub release License dependency - @tanuden/kumoha

[!TIP] This documentation is available in English & Japanese このドキュメントは英語版と日本語版があります。

docs - en ドキュメント - ja


🪝 Available Hooks

  • useInitializeKumoha(uri, options?) Initializes the Kumoha engine. This must be called before using any other hook. Accepts an optional configuration including test data.

  • useKumohaClientMeta() Provides real-time metadata about the client's connection status, current state, and login response.

  • useKumohaData() Returns the current synced game state and data (KumohaArisuData).

  • useKumoha() Exposes the underlying Kumoha engine instance. Useful for calling methods directly.

    This hook is especially important for users who want to use sendButtonAction. Use of other internal engine functions is intended for advanced users familiar with the inner workings of @tanuden/kumoha.

    For more details, refer to the main Kumoha library on GitHub: @tanuden/kumoha

📦 Installation

Install @tanuden/kumoha-react and its required dependencies @tanuden/kumoha and opentetsu:

npm install @tanuden/kumoha @tanuden/kumoha-react
npm install opentetsu -D

Make sure the packages are included in your project to ensure proper functionality.

⚙️ Usage

To get started, call useInitializeKumoha() at the top level of your component tree or inside a dedicated initialization component. All other hooks (useKumohaClientMeta, useKumohaData, and useKumoha) should only be used after initialization.

import {
  useInitializeKumoha,
  useKumohaClientMeta,
  useKumohaData,
  useKumoha,
} from '@tanuden/kumoha-react';

export const KumohaDemo = () => {
  const kumoha = useInitializeKumoha(`http://${window.location.hostname}:58680`);

  const clientMeta = useKumohaClientMeta();
  const data = useKumohaData();

  // If you want to call Kumoha methods directly in other components, you can use this:
  // const kumoha = useKumoha();

  return (
    <div>
      <p>Connected: {clientMeta.connected ? 'Yes' : 'No'}</p>
      <p>Game state: {data.state}</p>
      {/* Refer to the main Kumoha documentation for more details on sendButtonAction */}
      <button onClick={() => kumoha.sendButtonAction('DoorOpn', 'pulse')}>Open Door</button>
    </div>
  );
};

[!NOTE] Always call useInitializeKumoha() before using any other hooks from this library.

💾 Tanuden OSS

This project is licensed under the GNU Lesser General Public License v2.1 (LGPL-2.1). For more details, please see the LICENSE file.

[!IMPORTANT] This repository may contain trademarks or logos owned by Tanukigawa Railway. Unauthorized use is prohibited.

💝 Support

If you have some spare change you'll like to contribute to my ramen fund (helps keep me filled while working on projects), visit my Fanbox.

Tanuden Discord Server | Twitter | YouTube

Tanukigawa Electric Railway | Copyright © 2025 Haruyuki Tanukiji.