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

@zhangmo8/repl-react

v0.0.9-beta.1

Published

Online React application

Readme

repl-react

NPM dev or peer Dependency Version

A online playground for react, inspired by vue/repl and unocss/playground.

Thanks to the open source of vue/repl and its maintainers, this project is built to provide a similar experience for react.

@zhangmo8/repl-react

React REPL as a React component.

Environment Support

vite v6.0.0+

Make sure your vite version is above 6. If not, there may be wasm errors in the local environment. However, it does not affect the effect after packaging. For details, you can check here.

Usage

1. Wrap <Repl /> with ReplProvider (recommended)

import {
  Repl,
  ReplProvider,
  useReplStore,
} from "@zhangmo8/repl-react"

const Playground = () => (
  <ReplProvider config={{ defaultCode: "import React from 'react'" }}>
    <DemoControl />
    <Repl />
  </ReplProvider>
)

const DemoControl = () => {
  const { state, setState } = useReplStore()
  return (
    <div>
      <button onClick={() => setState({ ...state, showAST: !state.showAST })}>
        Toggle AST panel
      </button>
    </div>
  )
}

ReplProvider exposes the playground context, so any sibling or ancestor can safely call useReplStore to change visibility, code, etc. Use the config prop to bootstrap the REPL.

2. Use <Repl autoProvider /> for quick demos

import { Repl } from "@zhangmo8/repl-react"

const App = () => <Repl autoProvider theme="dark" />

The autoProvider flag defaults to false. When enabled, <Repl> renders its own ReplProvider internally so you can drop it straight into a page. Warning: because the provider is encapsulated, you cannot call useReplStore from outside and must rely on prop/config-driven inputs instead. If you need shared control, stick with an external ReplProvider.

tips

If <Repl> is rendered without either ReplProvider or autoProvider, it throws immediately with an error explaining a provider is required. This guard prevents silent undefined context issues.