Skip to content

Commit cff7e32

Browse files
authored
Merge pull request #52 from TheBrown/main
Fix merge conflicts and update describing-the-ui.md
2 parents a646e18 + 4b3248e commit cff7e32

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

src/content/learn/describing-the-ui.md

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ React ແມ່ນ JavaScript library ສຳລັບສະແດງຜົນໜ
1010

1111
<YouWillLearn isChapter={true}>
1212

13-
<<<<<<< HEAD
1413
* [ວິທີຂຽນ React component ທຳອິດຂອງທ່ານ](/learn/your-first-component)
1514
* [ເມືອໃດ ແລະ ວິທີການສ້າງຫຼາຍຟາຍ component](/learn/importing-and-exporting-components)
1615
* [ວິທີການເພີ່ມ markup ໃສ່ JavaScript ດ້ວຍ JSX](/learn/writing-markup-with-jsx)
@@ -19,17 +18,8 @@ React ແມ່ນ JavaScript library ສຳລັບສະແດງຜົນໜ
1918
* [ວິທີການສະແດງ component ແບບມີເງື່ອນໄຂ](/learn/conditional-rendering)
2019
* [ວິທີການສະແດງຫຼາຍ component ພ້ອມກັນ](/learn/rendering-lists)
2120
* [ວິທີການຫຼີກເວັ້ນຂໍ້ຜິດພາດໂດຍການຮັກສາໃຫ້ component pure ທີ່ສຸດ](/learn/keeping-components-pure)
22-
=======
23-
* [How to write your first React component](/learn/your-first-component)
24-
* [When and how to create multi-component files](/learn/importing-and-exporting-components)
25-
* [How to add markup to JavaScript with JSX](/learn/writing-markup-with-jsx)
26-
* [How to use curly braces with JSX to access JavaScript functionality from your components](/learn/javascript-in-jsx-with-curly-braces)
27-
* [How to configure components with props](/learn/passing-props-to-a-component)
28-
* [How to conditionally render components](/learn/conditional-rendering)
29-
* [How to render multiple components at a time](/learn/rendering-lists)
3021
* [How to avoid confusing bugs by keeping components pure](/learn/keeping-components-pure)
3122
* [Why understanding your UI as trees is useful](/learn/understanding-your-ui-as-a-tree)
32-
>>>>>>> 4bdb87b172a7723d56d03a5630c8a9870f6f03ec
3323

3424
</YouWillLearn>
3525

@@ -535,42 +525,38 @@ export default function TeaSet() {
535525

536526
</LearnMore>
537527

538-
<<<<<<< HEAD
539-
## ຕໍ່ໄປແມ່ນຫຍັງ? {/*whats-next*/}
540-
=======
541-
## Your UI as a tree {/*your-ui-as-a-tree*/}
528+
## UI ຂອງທ່ານຄືກັບຕົ້ນໄມ້ {/*your-ui-as-a-tree*/}
542529

543-
React uses trees to model the relationships between components and modules.
530+
React ໃຊ້ tree ເພື່ອສ້າງ model ຄວາມສຳພັນລະຫວ່າງ component ແລະ module.
544531

545-
A React render tree is a representation of the parent and child relationship between components.
532+
tree ການ render React ເປັນຕົວແທນຂອງຄວາມສຳພັນລະຫວ່າງ parent ແລະ child ລະຫວ່າງ component ຕ່າງໆ.
546533

547534
<Diagram name="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'.">
548535

549-
An example React render tree.
536+
ຕົວຢ່າງ React render tree.
550537

551538
</Diagram>
552539

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.
540+
Component ທີ່ຢູ່ດ້ານເທິງສຸດຂອງ tree, ໃກ້ກັບ root component, ຖືເປັນສ່ວນປະກອບຂອງ top-level component. Component ທີ່ບໍ່ມີ child component ເປັນ leaf component. ການຈັດໝວດໝູ່ component ນີ້ເປັນປະໂຫຍດຫຼາຍສຳລັບການທຳຄວາມເຂົ້າໃຈການໄຫຼຂໍ້ມູນ ແລະ ປະສິດທິພາບການ render.
554541

555-
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.
556543

557544
<Diagram name="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'.">
558545

559-
An example module dependency tree.
546+
ຕົວຢ່າງຂອງ module dependency tree.
560547

561548
</Diagram>
562549

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.
550+
Build tools ມັກໃຊ້ dependency tree ເພື່ອລວມ JavaScript Code ທີ່ກ່ຽວຂ້ອງທັງໝົດເພື່ອໃຫ້ client ດາວໂຫຼດ ແລະ render. Bundle ຂະໜາດໃຫຍ່ເຮັດໃຫ້ປະສົບການໃຊ້ງານຂອງຜູ້ໃຊ້ງານບໍ່ຄ່ອຍດີສຳລັບແອັບ React. ການທຳຄວາມເຂົ້າໃຈ module dependency tree ເປັນປະໂຫຍດຫຼາຍໃນການ debug ຫາບັນຫາດັ່ງກ່າວ.
564551

565552
<LearnMore path="/learn/understanding-your-ui-as-a-tree">
566553

567-
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 ທີ່ເປັນປະໂຫຍດແນວໃດສຳລັບການປັບປຸງປະສົບການໃຊ້ງານຂອງຜູ້ໃຊ້ ແລະ ປະສິດທິພາບ.
568555

569556
</LearnMore>
570557

571558

572-
## What's next? {/*whats-next*/}
573-
>>>>>>> 4bdb87b172a7723d56d03a5630c8a9870f6f03ec
559+
## ຕໍ່ໄປແມ່ນຫຍັງ? {/*whats-next*/}
574560

575561
ໄປທີ່ [Component ທຳອິດຂອງທ່ານ](/learn/your-first-component) ເພື່ອເລີ່ມອ່ານບົດນີ້ເທື່ອລະໜ້າ!
576562

0 commit comments

Comments
 (0)