# @remax/react-devtools-core

> Use react-devtools outside of the browser

Latest version **4.7.1** (published 2020-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @remax/react-devtools-core
pnpm add @remax/react-devtools-core
yarn add @remax/react-devtools-core
bun add @remax/react-devtools-core
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.7.1 |
| Published | 2020-06-24 |
| First published | 2020-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 707.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 250823 |
| Maintainers | darmody, xcodebuild, yesmeck |

## Links

- npm: https://www.npmjs.com/package/@remax/react-devtools-core
- Repository: https://github.com/facebook/react
- Homepage: https://github.com/facebook/react#readme
- Issues: https://github.com/facebook/react/issues
- npm.io page: https://npm.io/package/@remax/react-devtools-core

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^7
- [shell-quote](https://npm.io/package/shell-quote.md) ^1.6.1

## Recent versions

- 4.7.1 (latest) — 2020-06-24
- 4.7.0 — 2020-06-12

## README

# `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:

```js
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.
* `websocket: Websocket` - Custom websocked to use. Overrides `host` and `port` settings if provided.
* `resolveRNStyle: (style: number) => ?Object` - Used by the React Native style plug-in.
* `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.

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

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

## Development

Watch for changes made to the backend entry point and rebuild:
```sh
yarn start:backend
```

Watch for changes made to the standalone UI entry point and rebuild:
```sh
yarn start:standalone
```

---
_Source: https://npm.io/package/@remax/react-devtools-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
