Comments (4)
I think the diagram is fine, adding
false
would clutter it and confuse it with too many details. But maybe we could clarify howfalse
is taking up one of the positions. I think if you read deeply and compare the code from the previous example, you can deduce it though.@gaearon is it worth adding a note that explains that
false
takes up one of the positions/slots, and false isn't rendered? Or did you intentionally omit that?
because without the false
, it is conceptually incorrect. My past coworkers tend to have flaky understanding of React. Ask them why and they say, "do this and this will happen", and you ask them the reasoning behind it, they can't say it, or reply with "it is what it is".
If there is an easy way to present things as close as the truth, I think we should do it. Presenting approximation or inaccurate information only deepen tech debt. Person A cannot understand it so well, and then discusses with Person B, and things get more and more vague and inaccurate.
Even the line down below in Option 2: "You might have seen keys when rendering lists. Keys aren’t just for lists!
Explaining thing with exclamation point was never the method in the past or in formal text. It is more proper as "React has a special rule that, the position of the component in the tree, together with the key
, determines whether it is a component that should have its states reset". It was explained as such further down, but explaining things with exclamation point does not seem like a good start.
from reactjs.org.
I think the diagram is fine, adding false
would clutter it and confuse it with too many details. But maybe we could clarify how false
is taking up one of the positions. I think if you read deeply and compare the code from the previous example, you can deduce it though.
@gaearon is it worth adding a note that explains that false
takes up one of the positions/slots, and false isn't rendered? Or did you intentionally omit that?
from reactjs.org.
Related: #6288
from reactjs.org.
I think the diagram is fine, adding
false
would clutter it and confuse it with too many details. But maybe we could clarify howfalse
is taking up one of the positions. I think if you read deeply and compare the code from the previous example, you can deduce it though.@gaearon is it worth adding a note that explains that
false
takes up one of the positions/slots, and false isn't rendered? Or did you intentionally omit that?
imo having a note that says false
takes up one of the positions would help since new devs would not expect a falsy value to take up one of the positions on the tree.
from reactjs.org.
Related Issues (20)
- Changement de numero de telephone HOT 1
- [Suggestion]: Section from useContext might not be entirely accurate
- Unpredicted behaviour in Online Code editor[Bug]:
- Hey
- [Bug]: "Referencing Values with Refs" ref illustration leads to sketchy site
- This page doesn’t exist. HOT 1
- [Suggestion]: Add some elaboration to the docs for TypeScript DOM events and Pure Functions
- ⚠Phishing Website Warning!!! There are phishing website links in the document. HOT 1
- [Bug]: photos in ref section of the tutorial are down
- [Suggestion]: shortcuts to localized sites?
- Not Found
- [Bug]: the hydrate-mismatch link seems not right HOT 4
- GENERATE_SOURCEMAP=false Issue HOT 1
- Worflow Automator Issues
- [Bug]: Excessive Requests for Page Data - Why Does This Happen?
- links to "use server" and "use client" docs are broken on directive page docs
- directives page is not found HOT 1
- 'use server' reference page does not exist in the doc HOT 1
- [Suggestion]: Add tsconfig.json update to React 19 upgrade guide HOT 8
- Use-server documentation URL broken 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 reactjs.org.