react-devtools
Advanced tools
Comparing version 2.0.9 to 2.0.10
{ | ||
"name": "react-devtools", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "Use react-devtools outside of the browser", | ||
@@ -27,4 +27,4 @@ "repository": { | ||
"ip": "^1.1.4", | ||
"react-devtools-core": "^2.0.9" | ||
"react-devtools-core": "^2.0.10" | ||
} | ||
} |
@@ -1,25 +0,49 @@ | ||
# `npm install react-devtools` | ||
# `react-devtools` | ||
## Why use this? | ||
If you need to debug a react page somewhere other than Chrome on desktop (a | ||
mobile browser, an embedded webview, safari, etc), the `react-devtools` | ||
package is for you! | ||
If you need to debug a React page somewhere other than Chrome on desktop (a mobile browser, an embedded webview, safari, etc), the `react-devtools` package is for you! It is also useful if your app is inside an iframe. | ||
It works both with React DOM and React Native. | ||
## Usage | ||
1) Add `import 'react-devtools'` to the top of your entry file | ||
Install the package: | ||
``` | ||
import 'react-devtools' | ||
import React, {Component} from 'react' | ||
npm install --save-dev react-devtools | ||
``` | ||
2) Run the react-devtools standalone app. | ||
Add a script to your `package.json`: | ||
```js | ||
"scripts": { | ||
// ... | ||
"devtools": "react-devtools" | ||
} | ||
``` | ||
./node_modules/.bin/react-devtools | ||
Now run `npm run devtools` to launch the standalone DevTools app. | ||
The final step depends on your rendering target. | ||
### React Native | ||
You don't need to do anything else. Just make sure your app is running in foreground in the simulator, and DevTools will connect to it. | ||
### React DOM | ||
Add `import 'react-devtools'` to the top of your entry file. | ||
```js | ||
import 'react-devtools'; // Put it first! | ||
import ReactDOM from 'react-dom'; | ||
``` | ||
3) Profit! | ||
Make sure that your `react-devtools` import comes *before* your `react`, `react-dom`, or `react-native` | ||
imports. | ||
Make sure that your `react-devtools` import comes **before** your `react-dom` import. | ||
And **don't forget to remove the import before shipping to production!** | ||
## Advanced | ||
By default DevTools listen to port `8097` on `localhost`. | ||
If you need to customize host, port, or other settings, see the `react-devtools-core` package instead. | ||
@@ -29,4 +53,4 @@ | ||
1) `npm run build` | ||
2) `npm start` | ||
3) `npm publish` | ||
* Run `npm run backend:watch` and `npm run standalone:watch` in `../react-devtools-core` | ||
* Run `npm start` in this folder | ||
* Refresh the app after it has recompiled on change |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7050
56
Updatedreact-devtools-core@^2.0.10