@welldone-software/why-did-you-render
Advanced tools
Comparing version 6.0.3 to 6.0.4
/** | ||
* @welldone-software/why-did-you-render 6.0.3 | ||
* @welldone-software/why-did-you-render 6.0.4 | ||
* MIT Licensed | ||
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman) | ||
* Generated at 2020-11-24 | ||
* Generated at 2020-12-26 | ||
*/ | ||
@@ -7,0 +7,0 @@ |
@@ -1,1 +0,1 @@ | ||
module.exports = require('react/jsx-runtime') | ||
module.exports = require('react/jsx-runtime'); |
{ | ||
"name": "@welldone-software/why-did-you-render", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"description": "Monkey patches React to notify you about avoidable re-renders.", | ||
@@ -31,3 +31,3 @@ "types": "types.d.ts", | ||
"build": "cross-env NODE_ENV=production rollup --config", | ||
"_test": "cross-env TEST=true jest \"./tests\" --config=jest.config.js", | ||
"_test": "jest \"./tests\" --config=jest.config.js", | ||
"test:react-17": "yarn _test", | ||
@@ -66,14 +66,14 @@ "test:react-17-classic": "cross-env USE_CLASSIC_JSX=true yarn _test", | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.12.3", | ||
"@babel/cli": "^7.12.10", | ||
"@babel/core": "^7.12.10", | ||
"@babel/eslint-parser": "^7.12.1", | ||
"@babel/plugin-proposal-class-properties": "^7.12.1", | ||
"@babel/preset-env": "^7.12.1", | ||
"@babel/preset-react": "^7.12.5", | ||
"@rollup/plugin-babel": "^5.2.1", | ||
"@rollup/plugin-commonjs": "^16.0.0", | ||
"@babel/preset-env": "^7.12.11", | ||
"@babel/preset-react": "^7.12.10", | ||
"@rollup/plugin-babel": "^5.2.2", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-replace": "^2.3.4", | ||
"@testing-library/jest-dom": "^5.11.5", | ||
"@testing-library/react": "^11.1.1", | ||
"@types/react-redux": "^7.1.11", | ||
"@testing-library/jest-dom": "^5.11.6", | ||
"@testing-library/react": "^11.2.2", | ||
"@types/react-redux": "^7.1.14", | ||
"@welldone-software/jest-console-handler": "^0.1.1", | ||
@@ -87,18 +87,18 @@ "acorn-walk": "^8.0.0", | ||
"create-react-class": "^15.7.0", | ||
"cross-env": "^7.0.2", | ||
"cypress": "^5.5.0", | ||
"eslint": "^7.12.1", | ||
"cross-env": "^7.0.3", | ||
"cypress": "^6.2.0", | ||
"eslint": "^7.16.0", | ||
"eslint-plugin-cypress": "^2.11.2", | ||
"eslint-plugin-jest": "^24.1.0", | ||
"eslint-plugin-jest": "^24.1.3", | ||
"eslint-plugin-react": "^7.21.5", | ||
"express": "^4.17.1", | ||
"express-history-api-fallback": "^2.2.1", | ||
"husky": "^4.3.0", | ||
"husky": "^4.3.6", | ||
"jest": "^26.6.3", | ||
"jest-cli": "^26.6.3", | ||
"magic-string": "^0.25.7", | ||
"nollup": "^0.13.13", | ||
"nollup": "^0.14.4", | ||
"react": "^17.0.1", | ||
"react-16": "npm:react@^16.14.0", | ||
"react-dom": "npm:@hot-loader/react-dom@^17.0.0", | ||
"react-dom": "npm:@hot-loader/react-dom@^17.0.1", | ||
"react-dom-16": "npm:@hot-loader/react-dom@^16.14.0", | ||
@@ -112,11 +112,11 @@ "react-hot-loader": "^4.13.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.33.1", | ||
"rollup": "^2.35.1", | ||
"rollup-plugin-alias": "^2.2.0", | ||
"rollup-plugin-commonjs-alternate": "^0.7.1", | ||
"rollup-plugin-commonjs-alternate": "^0.7.2", | ||
"rollup-plugin-license": "^2.2.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"start-server-and-test": "^1.11.5", | ||
"start-server-and-test": "^1.11.6", | ||
"styled-components": "^5.2.1", | ||
"typescript": "^4.0.5" | ||
"typescript": "^4.1.3" | ||
} | ||
} |
# Why Did You Render | ||
![logo](images/WDYR-logo.jpg) | ||
[![npm version](https://badge.fury.io/js/%40welldone-software%2Fwhy-did-you-render.svg)](https://badge.fury.io/js/%40welldone-software%2Fwhy-did-you-render) | ||
@@ -16,8 +18,6 @@ [![Build Status](https://travis-ci.com/welldone-software/why-did-you-render.svg?branch=master)](https://travis-ci.com/welldone-software/why-did-you-render) | ||
![demo](images/demo.png) | ||
It can also help you to simply track when and why a certain component re-renders. | ||
## Setup | ||
The last version of the library has been tested [(unit tests and E2E)]((https://travis-ci.com/welldone-software/why-did-you-render.svg?branch=master)) with **`React@16.14`** and `React@17.0.1` but it is expected to work with all `React@16` and `React17` versions. | ||
The last version of the library has been tested [(unit tests and E2E)]((https://travis-ci.com/welldone-software/why-did-you-render.svg?branch=master)) with **`React@16.14.0`** and **`React@17.0.1`** but it is expected to work with all `React@16` and `React@17` versions. | ||
@@ -27,2 +27,6 @@ ``` | ||
``` | ||
or | ||
``` | ||
yarn add @welldone-software/why-did-you-render | ||
``` | ||
@@ -57,4 +61,9 @@ If you use the `automatic` JSX transformation, set the library to be the import source, and make sure `preset-react` is in `development` mode. | ||
Import `wdyr.js` as the first import (even before `react-hot-loader`): | ||
In [Typescript](issues/161), call the file wdyr.ts and add the following line to the top of the file to import the package's types: | ||
```tsx | ||
/// <reference types="@welldone-software/why-did-you-render" /> | ||
``` | ||
Import `wdyr` as the first import (even before `react-hot-loader`): | ||
`index.js`: | ||
@@ -116,2 +125,3 @@ ```jsx | ||
* [React-Redux With Hooks](https://medium.com/welldone-software/why-did-you-render-v4-released-48e0f0b99d4c) | ||
* [Mobx is currently not supported](https://github.com/welldone-software/why-did-you-render/issues/162) | ||
@@ -118,0 +128,0 @@ ## Sandbox |
Sorry, the diff of this file is not supported yet
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
159062
344