• Stars
    star
    243
  • Rank 166,489 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 5 years ago

Reviews

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

Repository Details

Injecting remotedev-app monitor into official Remote debugger of React Native. (formerly remote-redux-devtools-on-debugger)

remotedev-rn-debugger

Build Status NPM version Dependency Status devDependency Status

Demo

Injecting remotedev-app monitor into official Remote debugger of React Native. (formerly remote-redux-devtools-on-debugger)

We can use it with:

NOTE We will stop publish the old name remote-redux-devtools-on-debugger on next major version v0.9.

Installation

$ npm install --save-dev remotedev-rn-debugger

Usage

Add command to your project's package.json:

"scripts": {
  "postinstall": "remotedev-debugger [options]"
}

It will be run after npm install. (You can run npm run postinstall first)
The ./node_modules/react-native/local-cli/server/util/debugger.html will be replaced.

Options (--option)

Name Description
hostname The remotedev-server hostname. (default: localhost if port is set)
port The remotedev-server port. (default: 8000 if runserver or hostname is set)
runserver Start the remotedev-server with hostname, port option on local. (default: false)
secure Use https protocol for hostname. If you're use runserver or injectserver option, you can provide key, cert, passphrase options for remotedev-server. (default: false)
injectserver Inject remotedev-server with hostname, port option to node_modules/react-native/local-cli/server/server.js, then you can start ReactNative local server and RemoteDev local server with one command ($ npm start). (default: false)
injectdebugger Inject remotedev-app with hostname, port option to node_modules/react-native/local-cli/server/util/debugger.html. (default: true)
macos Use react-native-macos module name instead of react-native. (default: false)
revert Revert all injection. (default: false)
wsengine The web socket engine used in remotedev-server: ws or uws. If not set, remotedev-server default value is used. (default: undefined)

If you not set hostname or port or runserver or injectserver, it will apply default options.

Example - Use custom options in React Native project

You can ignore this guide if you used default options.

Install dev dependencies

$ npm install --save-dev remote-redux-devtools
$ npm install --save-dev remotedev-rn-debugger

Add command

Add command to your project's package.json:

"scripts": {
  "postinstall": "remotedev-debugger --hostname localhost --port 5678 --injectserver"
}

It will be run after npm install. (You can run npm run postinstall first)
If you debug on real device, you should use LAN IP as a hostname.

Edit configureStore.js

import { Platform } from 'react-native';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import devTools from 'remote-redux-devtools';
import reducer from '../reducers';

export default function configureStore(initialState) {
  const enhancer = compose(
    applyMiddleware(thunk),
    devTools({
      name: Platform.OS,
      hostname: 'localhost',
      port: 5678
    })
  );
  return createStore(reducer, initialState, enhancer);
}

You can reference this example.

License

MIT

More Repositories

1

react-native-debugger

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools
JavaScript
10,366
star
2

react-chrome-extension-boilerplate

Boilerplate for Chrome Extension React.js project
JavaScript
2,137
star
3

react-native-boilerplate

The React Native, Redux boilerplate for personal usage
JavaScript
246
star
4

rn-webrtc-arkit-integration

Capturing ARKit scene (Like `react-native-arkit`) into WebRTC video stream
JavaScript
162
star
5

babel-preset-es2015-node6

Babel preset to make node@6 fully ES2015 compatible.
JavaScript
132
star
6

react-native-android-badge

A react native wrapper for leolin310148/ShortcutBadger.
Java
90
star
7

css-to-rn.macro

Convert CSS to React Native style sheet at build time with babel macros
JavaScript
56
star
8

redux-dispatch-cli

A CLI tool for Redux remote dispatch. Used in remote-redux-devtools
JavaScript
29
star
9

react-native-devsettings-android

The Android implementation for iOS `NativeModules.DevSettings` of React Native.
Java
23
star
10

remotedev-extension

Use Redux DevTools in the Browser/Electron DevTools
JavaScript
17
star
11

rn-host-detect

Get correctly `localhost` on Android emulator for React Native.
JavaScript
16
star
12

generator-rnb

Scaffold out a react-native app
JavaScript
16
star
13

hyperterm-install-devtools

Install DevTools extension via Chrome Web Store on HyperTerm
JavaScript
12
star
14

actix-ip-filter

Actix Middleware for IP filter. Support glob pattern.
Rust
10
star
15

atom-redux-snippets

Atom Snippets for Redux.
CoffeeScript
9
star
16

react-native-layout-provider

Getting layout size by top provider instead of Dimensions
JavaScript
8
star
17

hyperterm-open-devtools

Open DevTools for currently showing web page with a hotkey on Hyper
JavaScript
8
star
18

remotedev-react-state

Inspecting / time travelling state changes of React component on Redux DevTools Extension or React Native Debugger
JavaScript
7
star
19

babel-preset-es2015-node-auto

Auto select babel-preset-es2015-node version via node version
JavaScript
6
star
20

isomorphic-react-flux-boilerplate

[Deprecated] Boilerplate for Isomorphic React/Flux project with live editing.
JavaScript
6
star
21

node-kairos-api

The Node.js client for the Kairos face recognition API.
LiveScript
5
star
22

docker-remotedev-server

Dockerized zalmoxisus/remotedev-server
JavaScript
5
star
23

hyperterm-close-on-left

Close tab on left for HyperTerm
JavaScript
5
star
24

vuex-remotedev

Inspecting vuex on Redux DevTools Extension / React Native Debugger
Vue
4
star
25

babel-plugin-transform-array-push

Simple transform `arr.push(a)` to `arr[arr.length] = a`, just follow loverajoel/jstips#00
JavaScript
4
star
26

react-native-debugger-redux-example

Objective-C
3
star
27

react-native-debugger-mobx-example

Objective-C
3
star
28

webpack-httpolyglot-server

Using mscdex/httpolyglot to serve http/https over the same port for Webpack development server
JavaScript
3
star
29

jsdc2017

My JSDC 2017 talk - Improve debugging experience on React Native
JavaScript
3
star
30

api-boilerplate

A RESTful API boilerplate with Koa for personal usage
JavaScript
2
star
31

proofood-chrome-extension

CSS
2
star
32

AndroidP2PAudioExample

2012/8/8 ηš„ζš«ε­˜
C
2
star
33

jhen0409.github.io

Jhen's development note.
CSS
1
star
34

jsonschema-is-js

The jsonschema validator property included is.js functions
JavaScript
1
star