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
Copy file name to clipboardExpand all lines: src/content/learn/conditional-rendering.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -629,11 +629,6 @@ Zwróć uwagę, że należy tu napisać `importance > 0 && ...`, zamiast `import
629
629
630
630
W tym rozwiązaniu dwa oddzielne warunki zostały użyte w celu wstawienia spacji między nazwą przedmiotu a wartością priorytetu. Alternatywnie, można użyć fragmentu, na początku którego wstawiłoby się spację: `importance > 0 && <> <i>...</i></>` lub można również wstawić spację wewnątrz `<i>`: `importance > 0 && <i> ...</i>`.
631
631
632
-
<<<<<<< HEAD
633
-
=======
634
-
In this solution, two separate conditions are used to insert a space between the name and the importance label. Alternatively, you could use a Fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
635
-
>>>>>>> 35530eea4bb8ba2567c1f57f1ccf730cc89b76de
636
-
637
632
</Solution>
638
633
639
634
#### Zamień szereg warunków `? :` na `if` ze zmiennymi {/*refactor-a-series-of---to-if-and-variables*/}
*[Jak wyrenderować wiele komponentów jednocześnie](/learn/rendering-lists)
21
20
*[Jak unikać trudnych w zwalczaniu błędów poprzez tworzenie czystych komponentów](/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)
30
-
*[How to avoid confusing bugs by keeping components pure](/learn/keeping-components-pure)
31
-
*[Why understanding your UI as trees is useful](/learn/understanding-your-ui-as-a-tree)
32
-
>>>>>>> 35530eea4bb8ba2567c1f57f1ccf730cc89b76de
21
+
*[Dlaczego warto patrzeć na UI jak na drzewo](/learn/understanding-your-ui-as-a-tree)
33
22
34
23
</YouWillLearn>
35
24
@@ -535,42 +524,30 @@ Aby dowiedzieć się jak pisać czyste funkcje o łatwym do przewidzenia wyniku
535
524
536
525
</LearnMore>
537
526
538
-
<<<<<<< HEAD
539
-
## Co dalej? {/*whats-next*/}
540
-
=======
541
-
## Your UI as a tree {/*your-ui-as-a-tree*/}
542
-
543
-
React uses trees to model the relationships between components and modules.
544
-
545
-
A React render tree is a representation of the parent and child relationship between components.
527
+
## Twój UI jako drzewo {/*your-ui-as-a-tree*/}
546
528
547
-
<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'.">
529
+
React używa drzew do modelowania relacji pomiędzy komponentami i modułami.
548
530
549
-
An example React render tree.
531
+
Drzewo renderowania w Reakcie to reprezentacja relacji rodzic-dziecko między komponentami.
550
532
551
-
</Diagram>
533
+
<Diagramname="generic_render_tree"height={250}width={500}alt="Graf drzewa z pięcioma węzłami, każdy z nich reprezentuje komponent. Węzeł korzenia znajduje się u góry grafu drzewa i jest oznaczony jako 'Root Component'. Ma on dwie strzałki rozciągające się w dół do dwóch węzłów oznaczonych jako 'Component A' i 'Component C'. Każda z strzałek jest oznaczona jako 'renders'. 'Component A' ma pojedynczą strzałkę 'renders' do węzła oznaczonego jako 'Component B'. 'Component C' ma pojedynczą strzałkę 'renders' do węzła oznaczonego jako 'Component D'.">Przykład drzewa renderowania w Reakcie.</Diagram>
552
534
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.
535
+
Komponenty blisko góry drzewa, w okolicach głównego komponentu (ang. _root component_), uważane są za komponenty najwyższego poziomu (ang. _top-level components_). Komponenty, które nie posiadają komponentów potomnych, są liśćmi (ang. _leaf components_). Takie kategoryzowanie komponentów jest przydatne do zrozumienia przepływu danych i wydajności renderowania.
554
536
555
-
Modelling the relationship between JavaScript modules is another useful way to understand your app. We refer to it as a module dependency tree.
537
+
Modelowanie relacji między modułami javascriptowymi to kolejny przydatny sposób na zrozumienia jak działa aplikacja. Nazywamy to drzewem zależności modułów.
556
538
557
-
<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'.">
539
+
<Diagramname="generic_dependency_tree"height={250}width={500}alt="Graf drzewa z pięcioma węzłami. Każdy węzeł reprezentuje moduł JavaScript. Najwyższy węzeł jest oznaczony jako 'RootModule.js'. Ma trzy strzałki rozciągające się do węzłów: 'ModuleA.js', 'ModuleB.js' i 'ModuleC.js'. Każda strzałka jest oznaczona jako 'imports'. Węzeł 'ModuleC.js' ma pojedynczą strzałkę 'imports', która wskazuje na węzeł oznaczony jako 'ModuleD.js'.">Przykład drzewa zależności modułów.</Diagram>
558
540
559
-
An example module dependency tree.
560
-
561
-
</Diagram>
562
-
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.
541
+
Drzewo zależności jest często wykorzystywane przez narzędzia do budowania w celu bundlowania całego kodu JavaScript, niezbędnego dla klienta do pobrania i renderowania. Duży rozmiar bundla wpływa negatywnie na doświadczenie użytkownika w aplikacjach reactowych. Zrozumienie drzewa zależności modułów jest pomocne przy debugowania tego typu problemów.
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.
545
+
Przeczytaj rozdział **[Twój UI jako drzewo](/learn/understanding-your-ui-as-a-tree)**, aby dowiedzieć się, jak tworzyć drzewa renderowania i zależności modułów dla aplikacji reactowych oraz jak mogą być one przydatne jako modele mentalne używane do poprawy doświadczenia użytkownika i wydajności aplikacji.
568
546
569
547
</LearnMore>
570
548
571
549
572
-
## What's next? {/*whats-next*/}
573
-
>>>>>>> 35530eea4bb8ba2567c1f57f1ccf730cc89b76de
550
+
## Co dalej? {/*whats-next*/}
574
551
575
552
Zacznij od rozdziału pt. [Twój pierwszy komponent](/learn/your-first-component)!
0 commit comments