react-devtools-core
Use react-devtools outside of the browser
Last updated 19 days ago by brianvaughn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-devtools-core 
SYNC missed versions from official npm registry.

react-devtools-core

A standalone React DevTools implementation.

This is a low-level package. If you're looking for the Electron app you can run, use react-devtools package instead.

API

react-devtools-core

This is similar requiring the react-devtools package, but provides several configurable options. Unlike react-devtools, requiring react-devtools-core doesn't connect immediately but instead exports a function:

const { connectToDevTools } = require("react-devtools-core");
connectToDevTools(config);

Run connectToDevTools() in the same context as React to set up a connection to DevTools.
Be sure to run this function before importing e.g. react, react-dom, react-native.

The config object may contain:

  • host: string (defaults to "localhost") - Websocket will connect to this host.
  • port: number (defaults to 8097) - Websocket will connect to this port.
  • useHttps: boolean (defaults to false) - Websocked should use a secure protocol (wss).
  • websocket: Websocket - Custom websocket to use. Overrides host and port settings if provided.
  • resolveRNStyle: (style: number) => ?Object - Used by the React Native style plug-in.
  • retryConnectionDelay: number (defaults to 2000) - Milliseconds delay to wait between retrying a failed Websocket connection.
  • isAppActive: () => boolean - If provided, DevTools will poll this method and wait until it returns true before connecting to React.

react-devtools-core/standalone

Renders the DevTools interface into a DOM node.

require("react-devtools-core/standalone")
  .setContentDOMNode(document.getElementById("container"))
  .setStatusListener(status => {
    // This callback is optional...
  })
  .startServer(port);

Renders DevTools interface into a DOM node over SSL using a custom host name (Default is localhost).

const host = 'dev.server.com';
const options = {
  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};


require("react-devtools-core/standalone")
  .setContentDOMNode(document.getElementById("container"))
  .setStatusListener(status => {
    // This callback is optional...
  })
  .startServer(port, host, options);

Reference the react-devtools package for a complete integration example.

Development

Watch for changes made to the backend entry point and rebuild:

yarn start:backend

Watch for changes made to the standalone UI entry point and rebuild:

yarn start:standalone

Current Tags

  • 3.5.0-alpha.0                                ...           alpha (2 years ago)
  • 4.10.0                                ...           latest (19 days ago)
  • 4.0.6                                ...           next (a year ago)

88 Versions

  • 4.10.0                                ...           19 days ago
  • 4.9.0                                ...           a month ago
  • 4.8.2                                ...           5 months ago
  • 4.8.1                                ...           5 months ago
  • 4.8.0                                ...           5 months ago
  • 4.7.0                                ...           6 months ago
  • 4.6.0                                ...           8 months ago
  • 4.5.0                                ...           9 months ago
  • 4.4.0                                ...           a year ago
  • 4.3.0                                ...           a year ago
  • 4.2.1                                ...           a year ago
  • 4.2.0                                ...           a year ago
  • 4.1.3                                ...           a year ago
  • 4.1.2                                ...           a year ago
  • 4.1.1                                ...           a year ago
  • 4.1.0                                ...           a year ago
  • 4.0.6                                ...           a year ago
  • 4.0.5                                ...           a year ago
  • 4.0.4                                ...           a year ago
  • 4.0.3                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 4.0.0-alpha.10                                ...           a year ago
  • 4.0.0-alpha.9                                ...           a year ago
  • 4.0.0-alpha.8                                ...           a year ago
  • 4.0.0-alpha.7                                ...           a year ago
  • 4.0.0-alpha.6                                ...           a year ago
  • 4.0.0-alpha.5                                ...           a year ago
  • 3.6.3                                ...           a year ago
  • 4.0.0-alpha.4                                ...           a year ago
  • 4.0.0-alpha.3                                ...           a year ago
  • 4.0.0-alpha.2                                ...           a year ago
  • 4.0.0-alpha.1                                ...           a year ago
  • 3.6.2                                ...           a year ago
  • 4.0.0-alpha.0                                ...           a year ago
  • 3.6.1                                ...           2 years ago
  • 3.6.0                                ...           2 years ago
  • 3.5.3                                ...           2 years ago
  • 3.5.2                                ...           2 years ago
  • 3.5.1                                ...           2 years ago
  • 3.5.0                                ...           2 years ago
  • 3.5.0-alpha.0                                ...           2 years ago
  • 3.4.3                                ...           2 years ago
  • 3.4.2                                ...           2 years ago
  • 3.4.1                                ...           2 years ago
  • 3.4.0                                ...           2 years ago
  • 3.3.4                                ...           2 years ago
  • 3.3.3                                ...           2 years ago
  • 3.3.2                                ...           2 years ago
  • 3.2.4-alpha.0                                ...           2 years ago
  • 3.2.3                                ...           3 years ago
  • 3.2.2                                ...           3 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.5.2                                ...           3 years ago
  • 2.5.1                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 2.4.0                                ...           3 years ago
  • 2.3.3                                ...           3 years ago
  • 2.3.2                                ...           3 years ago
  • 2.3.1                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.1                                ...           4 years ago
  • 2.2.0                                ...           4 years ago
  • 2.1.9                                ...           4 years ago
  • 2.1.8                                ...           4 years ago
  • 2.1.7                                ...           4 years ago
  • 2.1.5                                ...           4 years ago
  • 2.1.4                                ...           4 years ago
  • 2.1.3                                ...           4 years ago
  • 2.1.2                                ...           4 years ago
  • 2.1.1                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.12                                ...           4 years ago
  • 2.0.11                                ...           4 years ago
  • 2.0.10                                ...           4 years ago
  • 2.0.9                                ...           4 years ago
  • 2.0.8                                ...           4 years ago
  • 2.0.7                                ...           4 years ago
  • 2.0.6                                ...           4 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
Downloads
Today 548
This Week 1,713
This Month 548
Last Day 1,165
Last Week 6,572
Last Month 27,735
Dependencies (2)
Dev Dependencies (1)
Dependents (103)

Copyright 2014 - 2016 © taobao.org |