Last active
June 9, 2020 21:30
-
-
Save itaditya/6a62ffd785d499c0783e95de050adc90 to your computer and use it in GitHub Desktop.
Blog- Optimizing React apps with Memo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const car1 = { | |
| color: 'red', | |
| model: 'S', | |
| }; | |
| const car2 = { | |
| color: 'red', | |
| model: 'X', | |
| }; | |
| const car3 = { | |
| color: 'red', | |
| model: 'S', | |
| }; | |
| shallowCompare(car1, car2); // false | |
| shallowCompare(car1, car3); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment