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/index.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ Ključne reči `export default` određuju glavnu komponentu u fajlu. Ukoliko nis
79
79
80
80
Sintaksa markup-a koju ste videli iznad se zove *JSX*. Ona nije obavezna, ali većina React projekata koristi JSX zbog njegove praktičnosti. Svi [alati koje preporučujemo za lokalni razvoj](/learn/installation) podržavaju JSX odmah po instalaciji.
81
81
82
-
JSX je striktniji od HTML-a. Morate zatvoriti tagove poput `<br />`. Vaša komponenta takođe ne može vraćati više JSX tagova. Morate ih obuhvatiti zajedničkim roditeljem, poput `<div>...</div>` ili praznog `<>...</>` omotača:
82
+
JSX je striktniji od HTML-a. Morate zatvoriti tagove poput `<br />`. Vaša komponenta takođe ne može vraćati više JSX tagova. Morate ih obuhvatiti zajedničkim parent-om, poput `<div>...</div>` ili praznog `<>...</>` omotača:
83
83
84
84
```js {3,6}
85
85
functionAboutPage() {
@@ -393,25 +393,25 @@ U prethodnom primeru, svaki `MyButton` je imao nezavisni `count`, i kada je svak
393
393
394
394
<DiagramGroup>
395
395
396
-
<Diagram name="sharing_data_child" height={367} width={407} alt="Diagram showing a tree of three components, one parent labeled MyApp and two children labeled MyButton. Both MyButton components contain a count with value zero.">
396
+
<Diagram name="sharing_data_child" height={367} width={407} alt="Dijagram koji prikazuje stablo od tri komponente, jednu parent sa oznakom MyApp i dve children označene sa MyButton. Obe MyButton komponente sadrže brojač sa vrednošću nula.">
397
397
398
-
Initially, each`MyButton`'s `count` state is`0`
398
+
Inicijalno, obe`MyButton` komponente imaju `count` state `0`
399
399
400
400
</Diagram>
401
401
402
-
<Diagram name="sharing_data_child_clicked" height={367} width={407} alt="The same diagram as the previous, with the count of the first child MyButton component highlighted indicating a click with the count value incremented to one. The second MyButton component still contains value zero." >
402
+
<Diagram name="sharing_data_child_clicked" height={367} width={407} alt="Isti dijagram kao prethodni, sa istaknutim brojačem prve chilld komponente MyButton koji pokazuje da je kliknuto i da je vrednost brojača povećana na jedan. Druga MyButton komponenta još uvek sadrži vrednost nula." >
403
403
404
-
The first `MyButton`updates its `count`to`1`
404
+
Prva `MyButton`komponenta ažurira svoj `count`na`1`
405
405
406
406
</Diagram>
407
407
408
408
</DiagramGroup>
409
409
410
-
However, often you'll need components to *share data and always update together*.
410
+
Međutim, često će vam biti potrebno da komponente *prosleđuju podatke međusobno i uvek se zajedno ažuriraju*.
411
411
412
-
To make both`MyButton`components display the same`count`and update together, you need to move the state from the individual buttons "upwards" to the closest component containing all of them.
412
+
Da biste obe`MyButton`komponente prikazali sa istim`count`i ažurirali zajedno, morate premestiti state iz pojedinačnih dugmeta "nagore" do najbliže komponente koja sadrži sve njih.
0 commit comments