Use React.PureComponent and add whyDidYouUpdate for dev env #209

Merged
neb-b merged 4 commits from should-component-update into master 2017-06-09 01:37:59 +02:00
neb-b commented 2017-06-08 06:44:13 +02:00 (Migrated from github.com)

Summary

Added https://github.com/garbles/why-did-you-update for dev env

It just adds a warning in the console if a component renders more than once with the same props and state. The warning can be suppressed by manually adding a props/state comparison check in shouldComponentUpdate or just switching to React.PureComponent, which performs that check automatically.

https://facebook.github.io/react/docs/optimizing-performance.html#examples

Also I guess the Prettier check never made it's way to main.js 🤔

### Summary Added https://github.com/garbles/why-did-you-update for dev env It just adds a warning in the console if a component renders more than once with the same props and state. The warning can be suppressed by manually adding a props/state comparison check in `shouldComponentUpdate` or just switching to `React.PureComponent`, which performs that check automatically. https://facebook.github.io/react/docs/optimizing-performance.html#examples Also I guess the Prettier check never made it's way to `main.js` 🤔
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#209
No description provided.