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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-client

v1.0.38

Published

react-client is a lightweight CLI and runtime for building React apps with fast iteration.

Readme

npm npm GitHub issues

react-client is a next-generation CLI and runtime for building React apps with instant feedback, fast iteration, and a beautiful developer experience.

Built for simplicity, designed for speed ⚡


🚀 Table of Contents


🧩 Installation

Install globally and scaffold your first app:

npm install -g react-client
react-client init myapp --template react-ts
cd myapp
npm install
npm run dev

This launches the custom dev server — built on Connect + WebSocket + esbuild, featuring:

  • Instant rebuilds
  • React Fast Refresh (HMR)
  • Auto port detection & confirmation prompt
  • In-browser overlay with syntax-highlighted code frames

⚙️ With Config

You can generate a project-level configuration file using --with-config.

react-client init myapp --template react-ts --with-config

Creates:

// react-client.config.js
import { defineConfig } from 'react-client/config';

export default defineConfig({
  root: './src',
  server: { port: 2202 },
  build: { outDir: '.react-client/build' }
});

✅ Loaded automatically by the CLI
✅ Type-safe with IntelliSense via defineConfig()
✅ Supports .js, .mjs, .ts (auto-compiled)


🧰 Available Templates

| Template | Description | |-----------|-------------| | react | JavaScript SPA | | react-ts | TypeScript SPA | | react-tailwind | JS + Tailwind | | react-tailwind-ts | TS + Tailwind |

Each template is pre-configured for esbuild, HMR, and fast bootstrapping.


💎 Core Features

  • Custom Dev Server — Connect + WebSocket + esbuild
  • 🔁 React Fast Refresh (HMR) — State-preserving reloads
  • 💥 Overlay — Syntax-highlighted stack frames, clickable file links (vscode://file)
  • 🔍 Source Map Stack Mapping — Maps runtime errors to original TS/JS source lines
  • 💬 Auto Port Detection — Prompts when default port 2202 is occupied
  • 🧠 Smart Config Loader — Detects project root, compiles .ts configs dynamically
  • 🔌 Plugin Hook System — Extendable with configResolved, transform, buildEnd

🧬 How It Works

Under the hood:

  1. esbuild handles bundling, incremental rebuilds, and sourcemaps.
  2. Connect serves files and APIs (React Refresh runtime, overlay, source-map).
  3. WebSocket pushes HMR updates and overlay messages.
  4. Chokidar watches /src for changes and triggers rebuilds.

🧪 Local Development

To test react-client locally:

cd ~/Desktop/Workspace/Hoppy-projects/react-client
npm run build
npm link
cd myapp
react-client dev

If you run it from inside the CLI repo, it auto-detects and switches to myapp/ as the root.


🧩 Troubleshooting

❌ Config not loading

Make sure react-client.config.js exists in your project root (not .ts).

/Users/<you>/myapp/react-client.config.js

react-refresh/runtime not found

Install in the CLI or the project:

npm install react-refresh

⚠️ Port already in use

CLI will auto-detect and prompt:

Port 2202 is occupied. Use 5174 instead? (Y/n)

⚠️ Permission denied

Ensure your CLI entry file is executable:

chmod +x dist/cli/index.js
npm link

🧑‍💻 Contributing

We welcome contributions!
Read the Contributing Guide for setup instructions.

npm run lint
npm run test
npm run build

🚀 Publishing

Before publishing:

  1. Update version in package.json
  2. Run a full build
  3. Ensure the entry file has execute permission
npm run build
npm publish

Your package now includes:

  • #!/usr/bin/env node shebang
  • Auto-detecting config loader
  • Built-in React Refresh runtime

💬 Feedback

Found an issue or have a feature request?
👉 Open an issue


🪪 License

MIT Licensed © Venkatesh Sundaram