Formatting for view-flattening#2899
Merged
sammy-SC merged 1 commit intofabric-architecturefrom Dec 23, 2021
Merged
Conversation
9 tasks
sammy-SC
approved these changes
Dec 23, 2021
Contributor
sammy-SC
left a comment
There was a problem hiding this comment.
I just left one small comment. Thank you!
| #### View Flattening is an optimization by the React Native renderer to avoid deep layout trees. | ||
|
|
||
| The React API is designed to be declarative and reusable through composition; this is great for product developers because they can focus on what they want to render instead of how to render on the screen. However, in practice, these qualities of the API lead to the creation of deep React Element Trees, where a large majority of their Nodes only affect the layout of a View and don’t render anything on the screen, we call these types of nodes “Layout-Only” Nodes. | ||
| The React API is designed to be declarative and reusable through composition. This provides a great model for intuitive development. However, in implementation, these qualities of the API lead to the creation of deep [React Element Trees](glossary#react-element-tree-and-react-element), where a large majority of React Element Nodes only affect the layout of a View and don’t render anything on the screen. We call these types of nodes **“Layout-Only”** Nodes. |
Contributor
There was a problem hiding this comment.
why "in implementation"? I'm not familiar with this. Does it mean the same as "in practice"?
I tried to google the term but didn't find anything relevant.
Contributor
There was a problem hiding this comment.
I like how you split this into multiple sentences.
sammy-SC
added a commit
that referenced
this pull request
Dec 23, 2021
#2892) * Initial draft of new Architecture Section including docs on how React Native's renderer works * linting language * changing the IA for architecture section * update arc overview * Iterating on Fabric Architecture docs (#2895) * Add some intro to 'Render,Commit, and Mount' * Update Fabric Render -> Fabric Renderer * Split out rendering-implementation into three different docs * Create a sentence callout for each * Fix broken links * Formatting for view-flattening (#2899) * Updates to xplat-implementation, re: glossary links and fabric terms (#2898) * Refactor how we layout the scenarios (#2897) * Format render-pipeline.md (#2900) * Format fabric-renderer.md (#2901) * Format fabric-renderer.md * Anchor fabric-renderer in time * Add images to Fabric Deep Dive (#2902) * Resize images in threading model section (#2903) * Fabric-rendering word tweaks * Cut a 0.66 version of the architecture and update header * Word tweaks Co-authored-by: Luna <luwe@fb.com> Co-authored-by: Samuel Susla <samuel.susla@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Formatting for view-flattening