• This repository has been archived on 01/Dec/2023
  • Stars
    star
    204
  • Rank 192,063 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 12 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++
4,010
star
2

react-native-bootsplash

๐Ÿš€ Show a splash screen during app startup. Hide it when you are ready.
TypeScript
3,620
star
3

react-native-localize

๐ŸŒ A toolbox for your React Native app localization
TypeScript
2,259
star
4

react-native-bars

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

react-native-bootsplash-lottie-example

Java
53
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
32
star
8

prisma-cursor-pagination

Relay cursor pagination helpers for prisma
TypeScript
15
star
9

purestead

Use Laravel Homestead the Vagrant way.
Shell
14
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

types-testing-library-vitest-dom

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

PSD-Browser-Preview

Sync Photoshop and your browser
JavaScript
3
star
17

next-type-routes

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

twitter-eraser

A simple script to purge old tweets
JavaScript
2
star
19

personal-website

Reason
1
star
20

ScrollViewIssue

JavaScript
1
star
21

punk-api-exercise

HTML
1
star
22

sign-machine-poc

TypeScript
1
star
23

rn-location-permission-example

Java
1
star
24

wff

An extend based semantic grid for Sass
CSS
1
star
25

bump-app-package-version

A GitHub action to bump your app package.json version
TypeScript
1
star