• This repository has been archived on 01/Dec/2023
  • Stars
    star
    204
  • Rank 186,028 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 6 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add custom items to the React Native dev menu.

📳 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

Version React Native Support
4.0.0+ 0.61.0+

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!"));
}

More Repositories

1

react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
Objective-C++
3,907
star
2

react-native-bootsplash

🚀 Show a splash screen during app startup. Hide it when you are ready.
TypeScript
3,356
star
3

react-native-localize

🌍 A toolbox for your React Native app localization
TypeScript
2,174
star
4

react-native-bars

Components to control your app status and navigation bars.
TypeScript
271
star
5

react-native-bootsplash-lottie-example

Java
48
star
6

react-atomic-state

Dead simple React global state management based on use-sync-external-store.
TypeScript
47
star
7

valienv

A simple environment variables validator for Node.js, web browsers and React Native ✓
TypeScript
28
star
8

purestead

Use Laravel Homestead the Vagrant way.
Shell
14
star
9

prisma-cursor-pagination

Relay cursor pagination helpers for prisma
TypeScript
13
star
10

vagrant-rethinkdb

Try RethinkDB with Vagrant
JavaScript
6
star
11

react-router-with-chicane

4
star
12

react-native-module-template

Java
3
star
13

sound-mind.css

Default HTML elements style for modern days  👀
CSS
3
star
14

lillefp15-demo

A reason-react-native app to check Paris piscines pools opening hours
Reason
3
star
15

PSD-Browser-Preview

Sync Photoshop and your browser
JavaScript
3
star
16

types-testing-library-vitest-dom

TypeScript definitions for @testing-library/jest-dom (with vitest)
3
star
17

twitter-eraser

A simple script to purge old tweets
JavaScript
2
star
18

next-type-routes

An experiment to make next.js routes usage safer.
TypeScript
2
star
19

personal-website

Reason
1
star
20

ScrollViewIssue

JavaScript
1
star
21

punk-api-exercise

HTML
1
star
22

wff

An extend based semantic grid for Sass
CSS
1
star
23

sign-machine-poc

TypeScript
1
star
24

rn-location-permission-example

Java
1
star
25

urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
TypeScript
1
star