Comments (1)
@Cap32 This is a valid example to look into.
PureComponent
only does shallow checks, hence the re-render.
As per docs:
React.PureComponent's shouldComponentUpdate() only shallowly compares the objects. If these contain complex data structures, it may produce false-negatives for deeper differences. Only extend PureComponent when you expect to have simple props and state, or use forceUpdate() when you know deep data structures have changed. Or, consider using immutable objects to facilitate fast comparisons of nested data.
Furthermore, React.PureComponent's shouldComponentUpdate() skips prop updates for the whole component subtree. Make sure all the children components are also "pure".
from react-bits.
Related Issues (20)
- DI in React link Page not found HOT 1
- gitbook link gives 401 unauthorized error HOT 3
- ReadMe Redirection Links not working HOT 3
- “Conventions” reflect neither community conventions nor React team recommendations HOT 2
- React Loadable HOT 2
- [REQUEST] This is very useful - May I add this link in awesome react? HOT 2
- Misleading Anti-Patterns HOT 2
- Extend event handlers with an example of arrow function in class property HOT 1
- Best practices for role-based UI HOT 3
- Name for props of component prop use?
- Remove plagiarized content HOT 1
- [Using Indexes as Key] Misleading information HOT 1
- Is there any solution or practice for 2127 issue?
- Linter HOT 1
- Typescript branch
- What about using an object? HOT 2
- Is it OK to fork it and translate into other language by myself? HOT 4
- List components
- Possible typo in 18.conditionals-in-jsx.md under "do expression" section HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-bits.