Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-perf-devtool

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-perf-devtool - npm Package Compare versions

Comparing version 3.1.3-beta.4 to 3.1.8-beta.1

lib/devtool-hook.js

2

index.js

@@ -1,1 +0,1 @@

module.exports = require('./lib/npm/hook')
module.exports = require('./lib/devtool-hook.js')
{
"name": "react-perf-devtool",
"version": "3.1.3-beta.4",
"version": "3.1.8-beta.1",
"description": "A devtool for inspecting the performance of React Components",
"main": "index.js",
"files": [
"lib/shared",
"lib/npm"
],
"types": "index.d.ts",
"files": ["src", "lib"],
"author": "Nitin Tulswani",

@@ -24,4 +22,2 @@ "license": "MIT",

"babel-preset-react": "^6.24.1",
"babel-preset-react-app": "^3.1.0",
"chart.js": "^2.7.1",
"husky": "^0.14.3",

@@ -31,3 +27,2 @@ "jest": "^21.2.1",

"prettier": "^1.9.2",
"prop-types": "^15.6.0",
"react": "^16.2.0",

@@ -37,12 +32,18 @@ "react-dom": "^16.2.0",

"uglifyjs-webpack-plugin": "^1.1.2",
"webpack": "^3.10.0"
"webpack": "^4.0.1",
"webpack-cli": "^2.0.9"
},
"scripts": {
"test": "jest",
"build:babel": "rm -rf lib && babel src --out-dir lib",
"build:watch": "rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack --watch --config ./webpack/webpack.config.js --progress",
"build": "rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/webpack.config.js --progress && yarn build:babel",
"build:hook":
"rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack-cli --config ./webpack/webpack.config.hook.js --progress",
"build:watch":
"rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack-cli --watch --config ./webpack/webpack.config.js --progress",
"build":
"rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack-cli --config ./webpack/webpack.config.js --progress",
"precommit": "lint-staged",
"format": "find src -name '*.js' | xargs ./node_modules/.bin/prettier --write --no-semi --single-quote",
"generate": "yarn build && rm -rf ./extension/extension.zip && zip -r ./extension/extension.zip ./extension",
"format":
"find src -name '*.js' | xargs ./node_modules/.bin/prettier --write --no-semi --single-quote",
"generate":
"yarn build && rm -rf ./extension/extension.zip && zip -r ./extension/extension.zip ./extension",
"build:extension": "yarn format && yarn test && yarn generate"

@@ -49,0 +50,0 @@ },

@@ -6,3 +6,4 @@ # React Performance Devtool

![Author](https://img.shields.io/badge/author-Nitin%20Tulswani-lightgrey.svg)
![current-version](https://img.shields.io/badge/version-3.0.8-blue.svg)
![extension](https://img.shields.io/badge/extension-5.3-ff69b4.svg)
> A devtool for inspecting the performance of React Components

@@ -95,2 +96,8 @@

A `umd` build is also available via [unpkg](https://www.unpkg.com)
```js
<script crossorigin src="https://unpkg.com/react-perf-devtool@3.0.8-beta/lib/npm/hook.js"></script>
```
> This extension and package also depends on react. Please make sure you have those installed as well.

@@ -113,5 +120,4 @@

```js
var registerObserver = require('react-perf-devtool')
const { registerObserver } = require('react-perf-devtool')
// Simple, no?
registerObserver()

@@ -141,3 +147,3 @@ ```

```js
const registerObserver = require('react-perf-devtool')
const { registerObserver } = require('react-perf-devtool')

@@ -151,6 +157,4 @@ function callback(measures) {

After you've registered the observer, start your local development server and go to `http://localhost:3000/?react_perf`.
After you've registered the observer, start your local development server and go to `http://localhost:3000/`.
The query parameter `react_perf` is required so that React can measure the performance timings.
> Note - This extension works only for React 16 or above versions of it.

@@ -193,9 +197,9 @@

var React = require('react')
var ReactDOM = require('react-dom')
var registerObserver = require('react-perf-devtool')
const React = require('react')
const ReactDOM = require('react-dom')
const { registerObserver } = require('react-perf-devtool')
var Component = require('./Component') // Some React Component
const Component = require('./Component') // Some React Component
var options = {
const options = {
shouldLog: true,

@@ -216,3 +220,3 @@ port: 8080

// server.js
var { json } = require('micro')
const { json } = require('micro')

@@ -243,3 +247,3 @@ module.exports = async req => {

{
component, // Name of the component
componentName,
mount: { // Mount time

@@ -317,3 +321,3 @@ averageTimeSpentMs,

```js
var options = {
const options = {
shouldLog: true,

@@ -403,3 +407,3 @@ port: 3000,

```js
const registerObserver = require('react-perf-devtool')
const { registerObserver } = require('react-perf-devtool')

@@ -429,3 +433,2 @@ registerObserver()

- [x] Make the tool more comprehensible
> I have improved the documentation to make the tool more approachable and understand how the stats are calculated and what they mean.

@@ -432,0 +435,0 @@ ## Contributing

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc