You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Diagramname="generic_render_tree"height={250}width={500}alt="A tree graph with five nodes, with each node representing a component. The root node is located at the top the tree graph and is labelled 'Root Component'. It has two arrows extending down to two nodes labelled 'Component A' and 'Component C'. Each of the arrows is labelled with 'renders'. 'Component A' has a single 'renders' arrow to a node labelled 'Component B'. 'Component C' has a single 'renders' arrow to a node labelled 'Component D'.">
548
535
549
-
An example React render tree.
536
+
ຕົວຢ່າງ React render tree.
550
537
551
538
</Diagram>
552
539
553
-
Components near the top of the tree, near the root component, are considered top-level components. Components with no child components are leaf components. This categorization of components is useful for understanding data flow and rendering performance.
Modelling the relationship between JavaScript modules is another useful way to understand your app. We refer to it as a module dependency tree.
542
+
ການສ້າງ Model ຄວາມສຳພັນລະຫວ່າງ JavaScript module ເປັນອີກວິທີທີ່ມີປະໂຫຍດໃນການທຳຄວາມເຂົ້າໃຈແອັບຂອງທ່ານ. ພວກເຮົາເອີ້ນມັນວ່າເປັນ module dependency tree.
556
543
557
544
<Diagramname="generic_dependency_tree"height={250}width={500}alt="A tree graph with five nodes. Each node represents a JavaScript module. The top-most node is labelled 'RootModule.js'. It has three arrows extending to the nodes: 'ModuleA.js', 'ModuleB.js', and 'ModuleC.js'. Each arrow is labelled as 'imports'. 'ModuleC.js' node has a single 'imports' arrow that points to a node labelled 'ModuleD.js'.">
558
545
559
-
An example module dependency tree.
546
+
ຕົວຢ່າງຂອງ module dependency tree.
560
547
561
548
</Diagram>
562
549
563
-
A dependency tree is often used by build tools to bundle all the relevant JavaScript code for the client to download and render. A large bundle size regresses user experience for React apps. Understanding the module dependency tree is helpful to debug such issues.
Read**[Your UI as a Tree](/learn/understanding-your-ui-as-a-tree)**to learn how to create a render and module dependency trees for a React app and how they're useful mental models for improving user experience and performance.
554
+
ອ່ານ**[UI ຂອງທ່ານຄືກັບຕົ້ນໄມ້](/learn/understanding-your-ui-as-a-tree)**ເພື່ອຮຽນຮູ້ກ່ຽວກັບວິທີສ້າງການ render ແລະ module dependency tree ສຳລັບແອັບ React ແລະ ແບບຢ່າງ model ທີ່ເປັນປະໂຫຍດແນວໃດສຳລັບການປັບປຸງປະສົບການໃຊ້ງານຂອງຜູ້ໃຊ້ ແລະ ປະສິດທິພາບ.
0 commit comments