Skip to content

Commit 039692c

Browse files
committed
quickstart-line-220
1 parent 1e8f005 commit 039692c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/learn/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Dobrodošli u React dokumentaciju! Ova stranica pružiće vam uvod u 80% React k
1313
- Kako kreirati i umetati komponente
1414
- Kako dodavati markup i style-ove
1515
- Kako prikazivati podatke
16-
- Kako renderovati condition-e i liste
16+
- Kako renderovati kondicione izraze i liste
1717
- Kako reagovati na event-e i ažurirati prikaz na ekranu
1818
- Kako prosleđivati podatke među komponentama
1919

@@ -179,9 +179,9 @@ export default function Profile() {
179179
180180
U gore navedenom primeru, `style={{}}` nije posebna sintaksa, već običan `{}` objekat unutar `style={ }` JSX kovrdžavih zagrada. Možete koristiti `style` atribut kada se vaši style-ovi oslanjaju na JavaScript varijable.
181181
182-
## Conditional rendering {/*conditional-rendering*/}
182+
## Kondicionalno renderovanje {/*conditional-rendering*/}
183183
184-
In React, there is no special syntax for writing conditions. Instead, you'll use the same techniques as you use when writing regular JavaScript code. For example, you can use an [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) statement to conditionally include JSX:
184+
U React-u, nema posebne sintakse za pisanje kondicionih izraza. Umesto toga, koristićete iste tehnike kao kada pišete običan JavaScript kod. Na primer, možete koristiti [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) izraz za kondicionalno uključivanje JSX-a:
185185
186186
```js
187187
let content;
@@ -197,7 +197,7 @@ return (
197197
);
198198
```
199199
200-
If you prefer more compact code, you can use the [conditional `?` operator.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) Unlike `if`, it works inside JSX:
200+
Ako preferirate kompaktniji kod, možete koristiti [kondicionalni `?` operator.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) Za razliku od `if`, on radi unutar JSX-a:
201201
202202
```js
203203
<div>
@@ -209,15 +209,15 @@ If you prefer more compact code, you can use the [conditional `?` operator.](htt
209209
</div>
210210
```
211211
212-
When you don't need the `else` branch, you can also use a shorter [logical `&&` syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND#short-circuit_evaluation):
212+
Kada vam nije potrebna `else` grana, možete koristiti i kraću [logičku `&&` sintaksu](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND#short-circuit_evaluation):
213213
214214
```js
215215
<div>
216216
{isLoggedIn && <AdminPanel />}
217217
</div>
218218
```
219219
220-
All of these approaches also work for conditionally specifying attributes. If you're unfamiliar with some of this JavaScript syntax, you can start by always using `if...else`.
220+
Svi ovi pristupi takođe rade i za kondicionalno specificiranje atributa. Ako niste upoznati sa oovim delovima JavaScript sintakse, možete početi tako što ćete uvek koristiti `if...else`.
221221
222222
## Rendering lists {/*rendering-lists*/}
223223

0 commit comments

Comments
 (0)