mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
48cda4a00878c40926d2a1c1531b5e98a7619f95
## Summary This PR adds early return to the `diff` function. We don't need to go through all the entries of `nextProps`, process and deep-diff the values if `nextProps` is the same object as `prevProps`. Roughly 6% of all `diffProperties` calls can be skipped. ## How did you test this change? RNTester. DiffTrain build for commit https://github.com/facebook/react/commit/0061ca6cf47c5124d2ebe708481fb03da9e8e267.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%