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

react-native-expo-debug-menu

v0.1.4

Published

A debug menu component for React Native Expo apps

Readme

react-native-expo-debug-menu

React Native (Expo) アプリ向けのデバッグメニューコンポーネント。 開発ビルド (__DEV__) 時のみ表示されるデバッグボタンを提供し、任意のアクションを実行できます。

iOSではActionSheet、Android/Webではモーダルを使用します。

特徴

  • フローティングボタンでデバッグメニューにアクセス
  • iOS / Android / Web 対応
  • iOSではネイティブUI (ActionSheet) を使用
  • 開発モード (__DEV__) の自動検知
  • 非同期アクション対応

インストール

npm install react-native-expo-debug-menu
# または
yarn add react-native-expo-debug-menu

使い方

ルートコンポーネントを DebugMenuProvider でラップし、actions に実行したいアクションのリストを渡します。 showFloatingButtontrue にすると、画面にデバッグボタンが表示されます。

import { DebugMenuProvider, DebugAction } from 'react-native-expo-debug-menu';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { Stack } from 'expo-router';

export default function RootLayout() {
  const actions: DebugAction[] = [
    {
      label: 'リロード',
      onPress: () => {
        if (typeof location !== 'undefined' && location.reload) {
          location.reload();
        }
      }
    },
    {
      label: 'AsyncStorageをクリア',
      onPress: async () => {
        await AsyncStorage.clear();
        if (typeof location !== 'undefined' && location.reload) {
          location.reload();
        }
      }
    },
  ];

  return (
    <DebugMenuProvider
      actions={actions}
      showFloatingButton
      floatingButtonPosition={{ bottom: 20, right: 20 }}
    >
      <Stack />
    </DebugMenuProvider>
  );
}

Props

DebugMenuProvider

| Prop | Type | Default | Description | | ------------------------ | ------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------- | | actions | DebugAction[] | Required | デバッグメニューに表示するアクションのリスト | | children | React.ReactNode | Required | ラップする子コンポーネント | | enabled | boolean | __DEV__ | デバッグメニュー機能を有効にするかどうか。falseの場合、ボタンもメニューも表示されません。 | | showFloatingButton | boolean | false | true の場合、画面右下にフローティングボタンを表示します。 | | defaultVisible | boolean | false | 初期状態でメニューを表示するかどうか。 | | floatingButtonPosition | { top?: number; bottom?: number; left?: number; right?: number; } | { bottom: 50, right: 20 } | フローティングボタンの位置を指定します。 |

DebugAction

| Property | Type | Description | | --------- | ---------------------------------------- | ------------------------------------------------------------------------------ | | label | string | メニューに表示されるアクション名 | | onPress | () => void \| Promise<void> | アクションが選択されたときに実行される関数 | | style | 'default' \| 'cancel' \| 'destructive' | (Optional) アクションのスタイル。destructiveを指定すると赤字で表示されます。 |

開発・公開手順

ビルド

npm run build

npmへの公開

  1. バージョンを更新します。
npm version patch # または minor, major
  1. npmに公開します(ビルドは自動的に実行されます)。
npm publish

License

MIT