https://github.com/jderochervlk/react-performance-example
https://github.com/jderochervlk/react-performance-example
javascript performance react
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jderochervlk/react-performance-example
- Owner: jderochervlk
- Created: 2022-07-25T16:04:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-25T19:30:07.000Z (almost 3 years ago)
- Last Synced: 2025-02-07T21:42:41.044Z (5 months ago)
- Topics: javascript, performance, react
- Language: JavaScript
- Homepage:
- Size: 69.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Performance Example
This is meant to be a minimal application to show the different between setting a state with plan JS objects, comparing the object before setting to state, and using Immutable.js to merge a new value into the old value before setting state.
## Running
```
yarn dev
```## Summary
- Avoid passing objects as props when possible
- When you do pass objects as props, make sure the object source doesn't change unless it needs to
- Using `_.isEquals` is good if you want to just use JavaScript objects
- `mergeDeep` is good if you want to use Immutable.JS