This commit is contained in:
Vincent Bailly 2019-02-01 14:25:15 +01:00
Родитель 76c53b7cbe
Коммит a3ebf4e307
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -2,9 +2,15 @@
# [WastedRendersDetector](https://github.com/Microsoft/WastedRendersDetector)
Small tool aiming to ease the debugging of wasted react renders.
Wasted react renders is when a react component updates but this does not result in actual DOM mutations.
This is a common problem when using connect().
This tool should be used in debug builds only.
It helps detecting the two following scenarios:
- a component updates because some props changed but the old props and the new props are deep equal.
- a component updates because some function props mutated, this happens if we create lambdas in render() or mapStateToProps.
# Usage
```ts