Skip to content

Commit 92b053e

Browse files
committed
Resolve conflicts
1 parent 9810399 commit 92b053e

7 files changed

Lines changed: 6 additions & 34 deletions

File tree

‎src/content/learn/extracting-state-logic-into-a-reducer.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,11 +874,7 @@ Reducer-i imaju i mane! Evo par načina da ih poredite:
874874
- **Testiranje:** Reducer je čista funkcija koja ne zavisi od vaše komponente. To znači da je možete export-ovati i testirati izolovano. Iako je obično najbolje testirati komponente u realističnijem okruženju, za kompleksniju logiku ažuriranja state-a može biti korisno da se uverite da vaš reducer vraća određeni state za određeni inicijalni state i akciju.
875875
- **Lična preferenca:** Neki ljudi vole reducer-e, ostali ne vole. To je u redu. Stvar je preferenci. Uvek možete menjati između `useState` i `useReducer`: jednaki su!
876876

877-
<<<<<<< HEAD
878877
Preporučujemo da koristite reducer ako često nailazite na bug-ove zbog neispravnog ažuriranja state-a u nekoj komponenti i želite da uvedete veću strukturu u njen kod. Ne morate koristiti reducer-e za sve: slobodno kombinujte! Možete čak koristiti `useState` i `useReducer` u istoj komponenti.
879-
=======
880-
We recommend using a reducer if you often encounter bugs due to incorrect state updates in some component, and want to introduce more structure to its code. You don't have to use reducers for everything: feel free to mix and match! You can even use `useState` and `useReducer` in the same component.
881-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
882878

883879
## Pravilno pisanje reducer-a {/*writing-reducers-well*/}
884880

‎src/content/learn/index.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,7 @@ function MyButton() {
336336
}
337337
```
338338
339-
<<<<<<< HEAD
340-
React će ponovo pozvati funkciju vaše komponente. Ovaj put, `count` će biti `1`. Zatim će biti `2`. I tako dalje.
341-
=======
342-
Calling `setCount` tells React to call your component function again. This is called a *re-render*. This time, `count` will be `1`. Then it will be `2`. And so on.
343-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
339+
Pozivanje `setCount`-a govori React-u da ponovo pozove funkciju vaše komponente. Ovo se naziva *ponovni render*. Ovaj put, `count` će biti `1`. Zatim će biti `2`. I tako dalje.
344340
345341
Ako renderujete istu komponentu više puta, svaka će dobiti svoje sopstveni state. Kliknite svako dugme posebno:
346342

‎src/content/learn/preserving-and-resetting-state.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ State je izolovan između komponenata. React prati koji state pripada kojoj komp
1818

1919
## State je povezan sa pozicijom u stablu renderovanja {/*state-is-tied-to-a-position-in-the-tree*/}
2020

21-
<<<<<<< HEAD
22-
React pravi [stabla renderovanja](learn/understanding-your-ui-as-a-tree#the-render-tree) za strukturu komponenti na vašem UI-u.
23-
=======
24-
React builds [render trees](/learn/understanding-your-ui-as-a-tree#the-render-tree) for the component structure in your UI.
25-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
21+
React pravi [stabla renderovanja](/learn/understanding-your-ui-as-a-tree#the-render-tree) za strukturu komponenti na vašem UI-u.
2622

2723
Kada komponenti date state, možete pomisliti da state "živi" unutar komponente. Ali, state se zapravo čuva unutar React-a. React povezuje svaki deo state-a sa tačnom komponentom na osnovu mesta na kom se ta komponenta nalazi u stablu renderovanja.
2824

‎src/content/learn/setup.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ TypeScript je popularan način za dodavanje definicija tipova u JavaScript kod.
1717

1818
## React Developer Tools {/*react-developer-tools*/}
1919

20-
<<<<<<< HEAD
21-
React Developer Tools je ekstenzija za pretraživač koja može da inspektuje React komponente, menja props-e i state, kao i da identifikuje probleme u performansama. Naučite kako da je instalirate [ovde](learn/react-developer-tools).
22-
=======
23-
React Developer Tools is a browser extension that can inspect React components, edit props and state, and identify performance problems. Learn how to install it [here](/learn/react-developer-tools).
24-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
20+
React Developer Tools je ekstenzija za pretraživač koja može da inspektuje React komponente, menja props-e i state, kao i da identifikuje probleme u performansama. Naučite kako da je instalirate [ovde](/learn/react-developer-tools).
2521

2622
## React kompajler {/*react-compiler*/}
2723

‎src/content/learn/tutorial-tic-tac-toe.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,11 +1138,7 @@ JavaScript podržava [closures](https://developer.mozilla.org/en-US/docs/Web/Jav
11381138
11391139
</Note>
11401140
1141-
<<<<<<< HEAD
1142-
Sada možete dodati X-ove na tablu... ali samo u gornji levi kvadrat. Vaša funkcija `handleClick` je trenutno hardkodirana da update-uje indeks gornjeg levog kvadrata (`0`). Napravimo update `handleClick` tako da može update-ovati bilo koji kvadrat. Dodajte argument `i` funkciji `handleClick` koji prima indeks kvadrata koji treba update-ovati:
1143-
=======
1144-
Now you can add X's to the board... but only to the upper left square. Your `handleClick` function is hardcoded to update the index for the upper left square (`0`). Let's update `handleClick` to be able to update any square. Add a parameter `i` to the `handleClick` function that takes the index of the square to update:
1145-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
1141+
Sada možete dodati X-ove na tablu... ali samo u gornji levi kvadrat. Vaša funkcija `handleClick` je trenutno hardkodirana da update-uje indeks gornjeg levog kvadrata (`0`). Napravimo update `handleClick` tako da može update-ovati bilo koji kvadrat. Dodajte parametar `i` funkciji `handleClick` koji prima indeks kvadrata koji treba update-ovati:
11461142
11471143
```js {4,6}
11481144
export default function Board() {

‎src/content/reference/react/hooks.md‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ title: Ugrađeni React Hook-ovi
1616

1717
Da biste dodali state u komponentu, koristite jedan od ovih Hook-ova:
1818

19-
<<<<<<< HEAD
19+
2020
* [`useState`](/reference/react/useState) deklariše state promenljivu koju direktno možete ažurirati.
2121
* [`useReducer`](/reference/react/useReducer) deklariše state promenljivu sa logikom ažuriranja unutar [reducer funkcije](/learn/extracting-state-logic-into-a-reducer).
22-
=======
23-
* [`useState`](/reference/react/useState) declares a state variable that you can update directly.
24-
* [`useReducer`](/reference/react/useReducer) declares a state variable with the update logic inside a [reducer function.](/learn/extracting-state-logic-into-a-reducer)
25-
* [`useOptimistic`](/reference/react/useOptimistic) lets you show a different state while an async action is pending.
26-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
22+
* [`useOptimistic`](/reference/react/useOptimistic) vam omogućava da prikažete drugačiji state dok se izvršava asinhrona akcija.
2723

2824
```js
2925
function ImageGallery() {

‎src/content/reference/react/useContext.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,11 +1366,7 @@ Možda imate provider bez `value` u stablu:
13661366
13671367
Ako zaboravite specificirati `value`, to je kao da prosleđujete `value={undefined}`.
13681368
1369-
<<<<<<< HEAD
13701369
Možda ste greškom iskoristili drugo ime za prop:
1371-
=======
1372-
You may have also used a different prop name by mistake:
1373-
>>>>>>> f5fa1e82edacdf8c6bfc4dfd9cf52029a96d5fd3
13741370
13751371
```js {1,2}
13761372
// 🚩 Ne radi: prop treba da se zove "value"

0 commit comments

Comments
 (0)