Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-dev-menu

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-dev-menu

Add custom items to the React Native dev menu

  • 4.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.6K
decreased by-9.12%
Maintainers
1
Weekly downloads
 
Created
Source

📳 react-native-dev-menu

mit licence npm version npm downloads
platform - android platform - ios

Add custom items to the React Native dev menu.
The native part of this module is a variation of react-native-async-storage-dev-menu-item.

Support

VersionReact Native Support
4.0.0+0.61.0+

Funding

This library helped you? Consider sponsoring!

This module is provided as is, I work on it in my free time.

If your company uses it in a production app, consider sponsoring this project 💰. You also can contact me for premium enterprise support, help with issues, prioritize bugfixes, feature requests, etc.

Setup

$ npm install --save react-native-dev-menu
# --- or ---
$ yarn add react-native-dev-menu

Don't forget to run pod install after that !

🆘  Manual linking

Because this package targets React Native 0.61.0+, you will probably don't need to link it manually. Otherwise if it's not the case, follow this additional instructions:

👀 See manual linking instructions

iOS

Add this line to your ios/Podfile file, then run pod install.

target 'YourAwesomeProject' do
  # …
  pod 'RNDevMenu', :path => '../node_modules/react-native-dev-menu'
end

Android

  1. Add the following lines to android/settings.gradle:
include ':react-native-dev-menu'
project(':react-native-dev-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dev-menu/android')
  1. Add the implementation line to the dependencies in android/app/build.gradle:
dependencies {
  // ...
  implementation project(':react-native-dev-menu')
}
  1. Add the import and link the package in MainApplication.java:
import com.zoontek.rndevmenu.RNDevMenuPackage; // <- add the RNDevMenuPackage import

public class MainApplication extends Application implements ReactApplication {

  // …

  @Override
  protected List<ReactPackage> getPackages() {
    @SuppressWarnings("UnnecessaryLocalVariable")
    List<ReactPackage> packages = new PackageList(this).getPackages();
    // …
    packages.add(new RNDevMenuPackage());
    return packages;
  }

  // …
}

Usage

import DevMenu from "react-native-dev-menu";

if (__DEV__) {
  DevMenu.addItem("Say Hello", () => alert("Hello!"));
}

Keywords

FAQs

Package last updated on 14 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc