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

rnconsole

v0.0.1

Published

A react-native version vConsole

Readme

rnconsole

react-native 版本的vConsole


功能

  • JS 日志: console.log|info|error|...
  • JS 网络请求: XMLHttpRequest
  • 自定义插件

快速入门

  • 注意:该库引入valtioreact-native-device-info作为peerDependencies,宿主项目需要确保安装了这些依赖

    "peerDependencies": {
      "react": "16.9.0",
      "react-native": "0.61.4",
      "react-native-device-info": "^10.3.0",
      "valtio": "^1.9.0"
    }
  • 安装依赖

    npm i rnconsole
    # 或yarn
    yarn add rnconsole
    # 或pnpm
    pnpm add rnconsole
  • 引入RNConsoleComponent即可

    import { RNConsoleComponent } from 'rnconsole'
    
    ...
    <RNConsoleComponent />
    ...
  • 图标功能说明:

    | 图标 | 功能 | | :----------------------------------------------------------: | :------------: | | | 隐藏面板 | | | 最大化面板 | | | 最小化面板 | | | 打开系统信息页 | | | 打开设置页 | | | 打开帮助页 |

API

  • 若需要手动控制RNConsoleComponent的可见性,可通过RNConsole.instance?.showSwitch()/hideSwitch()控制。此外,还可通过在RNConsoleComponent上设置withCloseButton属性给予入口处一个关闭按钮:

    // 展示RNConsole入口
    RNConsole.instance?.showSwitch()
    // 隐藏RNConsole入口
    RNConsole.instance?.hideSwitch()
    
    ...
    <RNConsoleComponent withCloseButton={true} />
    ...
  • 若需要添加自定义插件,需要先实例化RNConsolePlugin并传入插件 ID 及插件名称;若插件需要展示面板,则要添加renderTab事件,并在回调函数中渲染面板组件;最后再添加插件实例:

    import { IRNConsolePluginEvent, RNConsole, RNConsolePlugin } from "rnconsole";
      
    const MyPlugin = () => <Text>My plugin</Text>;
    const myPlugin = new RNConsolePlugin("myPlugin", "我的");
    myPlugin.on("renderTab", (render: IRNConsolePluginEvent) => render(MyPlugin));
    RNConsole.instance?.addPlugin(myPlugin);

开发

  • 使用 npm7+进行依赖安装,否则 peerDependencies 无法自动安装

    npm i
  • 通过 Rollup 进行构建并监听变动:

    npm run dev
  • React Native 无法使用 symlinks 进行调试,需要借助wml

    npm i -g wml
    # add the link to wml using `wml add <src> <dest>`
    wml add ~/my-package ~/main-project/node_modules/my-package
    # start watching all links added
    npm run wml
  • MacOS 首次运行 wml 需要先执行:

    watchman watch /usr/local/lib/node_modules/wml/src
  • Windows 首次运行 wml 需要先执行:

    # npmGlobalPrefix 可以通过 `npm prefix -g` 获取
    $ watchman watch ${npmGlobalPrefix}\node_modules\wml\src
    # 一定要重启电脑让配置生效!
  • 修改 .watchmanconfig 之后需要清空 watchman 缓存:npm run wml:clean