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/synchronizing-with-effects.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -627,11 +627,7 @@ See the examples below for how to handle common patterns.
627
627
628
628
### React olmayan widget'ları kontrol etmek {/*controlling-non-react-widgets*/}
629
629
630
-
<<<<<<< HEAD
631
-
Bazen React'e yazılmamış UI widget'ları eklemek isteyebilirsiniz. Örneğin, sayfanıza bir harita bileşeni ekliyorsunuz. Bu harita `setZoomLevel()` metoduna sahip ve React kodunuzdaki `zoomLevel` state değişkenini yakınlaştırma seviyesi ile senkronize etmek istiyorsunuz. Efektiniz şuna benzeyecektir:
632
-
=======
633
-
Sometimes you need to add UI widgets that aren't written in React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
634
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
630
+
Bazen React'te yazılmamış UI widget'ları eklemek isteyebilirsiniz. Örneğin, sayfanıza bir harita bileşeni ekliyorsunuz. Bu harita `setZoomLevel()` metoduna sahip ve React kodunuzdaki `zoomLevel` state değişkenini yakınlaştırma seviyesi ile senkronize etmek istiyorsunuz. Efektiniz şuna benzeyecektir:
Copy file name to clipboardExpand all lines: src/content/learn/tutorial-tic-tac-toe.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1133,11 +1133,7 @@ export default function Board() {
1133
1133
1134
1134
<Note>
1135
1135
1136
-
<<<<<<< HEAD
1137
1136
JavaScript [closure'ları](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) destekler. Bu da demektir ki bir iç fonksiyon (`handleClick` gibi) bir dış fonksiyonda (`Board` gibi) tanımlanan değişkenlere ve fonksiyonlar ulaşabilir. `handleClick` fonksiyonu `squares` state'ini okuyabilir ve `setSquares` metodunu çağırabilir çünkü her ikisi de `Board` fonksiyonu içinde tanımlanmıştır.
1138
-
=======
1139
-
JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in an outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
Copy file name to clipboardExpand all lines: src/content/learn/updating-objects-in-state.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -377,11 +377,7 @@ Dikkat edilmesi gereken bir nokta, `...` spread sözdiziminin "yüzeysel" olmas
377
377
378
378
#### Birden çok alan için tek bir olay yöneticisi kullanma {/*using-a-single-event-handler-for-multiple-fields*/}
379
379
380
-
<<<<<<< HEAD
381
-
Ayrıca obje tanımınızda `[` and `]` ayraçlarını kullanarak dinamik isme sahip bir özellik belirleyebilirsiniz. İşte üç farklı olay işleyicisi yerine tek bir olay işleyicisi kullanan aynı örnek:
382
-
=======
383
-
You can also use the `[` and `]` braces inside your object definition to specify a property with a dynamic name. Here is the same example, but with a single event handler instead of three different ones:
384
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
380
+
Ayrıca obje tanımınızda `[` and `]` parantezlerini kullanarak dinamik isme sahip bir özellik belirleyebilirsiniz. İşte üç farklı olay işleyicisi yerine tek bir olay işleyicisi kullanan aynı örnek:
Copy file name to clipboardExpand all lines: src/content/learn/you-might-not-need-an-effect.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -411,11 +411,7 @@ function Game() {
411
411
412
412
Birinci problem bu kodun çok verimsiz olmasıdır: bileşenin (ve onun alt elemanlarının) `set` çağrıları arasında her seferinde yeniden render edilmesidir. Yukarıdaki örnekte, en kötü durumda (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) alt eleman ağacında üç gereksiz yeniden render işlemi gerçekleşir.
413
413
414
-
<<<<<<< HEAD
415
414
İkinci problem ise; hızlı olmasa bile, kodunuz geliştikçe yeni gereksinimlere uygun olmayan durumlarla karşılaşabilirsiniz. Örneğin, oyun hareketlerinin geçmişini adım adım izlemek için bir yol eklemek istediğinizi düşünün. Her bir state değişkenini geçmişteki bir değere güncelleyerek bunu yapardınız. Ancak, `card` state'ini geçmişteki bir değere ayarlamak, Efekt zincirini tekrar tetikler ve gösterilen verileri değiştirir. Bu tür bir kod genellikle sert ve kırılgan olabilir.
416
-
=======
417
-
The first problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
418
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
419
415
420
416
Bu durumda, yapabileceğiniz hesaplamaları render işlemi sırasında gerçekleştirmek ve durumu olay yöneticisinde ayarlamak daha iyidir.
* `reactNode`: HTML'e render etmek istediğiniz React düğümüdür. Örneğin, `<App />` gibi bir JSX bileşeni. Belgenin tamamını temsil etmesi beklediğinden dolayı `App` bileşeni `<html>` etiketini render etmelidir.
50
50
51
-
<<<<<<< HEAD
52
51
* **isteğe bağlı** `options`: Stream seçenekleri olan bir nesne.
53
52
* **isteğe bağlı** `bootstrapScriptContent`: Eğer belirtilmişse, bu string satır içi `<script>` etiketinin içine yerleştirilecektir.
54
53
* **isteğe bağlı** `bootstrapScripts`: `<script>` etiketlerinin sayfada yayınlayacağı string tipindeki URL'lerin dizisi. Kullanmak için, [`hydrateRoot`](/reference/react-dom/client/hydrateRoot)'u çağıran `<script>` etiketiketine dahil edin. React'ı istemci üzerinde çalıştırmak istemiyorsanız atlayınız.
* **isteğe bağlı** `onShellReady`: [Başlangıç shell](#specifying-what-goes-into-the-shell)'i render edildikten hemen sonra çağırılan callbacktir. [Durum kodunu ayarlamak](#setting-the-status-code) ve streami başlatmak için `pipe`'ı çağırabilirsiniz. React shellden sonra [ek contentleri stream](#streaming-more-content-as-it-loads) edecektir ve bu contentleri HTML yükleme fallbacklerini değiştiren `<script>` etiketleriyle birlikte stream edecektir.
62
61
* **isteğe bağlı** `onShellError`: Başlangıç shelli render edilirken bir hata varsa çağırılan callbacktir. Hatayı argüman olarak alır. Stream için herhangi bir byte yayınlanmaz ve `onShellReady` ya da `onAllReady` çağırılmaz. Böylece [bir HTML shellinin fallback çıktısını](#recovering-from-errors-inside-the-shell) alabilirsiniz.
63
62
* **isteğe bağlı** `progressiveChunkSize`: Yığındaki byte sayısıdır. [Varsayılan buluşsal yöntem hakkında daha fazlasını okuyun.](https://github.com/facebook/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
64
-
=======
65
-
* **optional** `options`: An object with streaming options.
66
-
* **optional** `bootstrapScriptContent`: If specified, this string will be placed in an inline `<script>` tag.
67
-
* **optional** `bootstrapScripts`: An array of string URLs for the `<script>` tags to emit on the page. Use this to include the `<script>` that calls [`hydrateRoot`.](/reference/react-dom/client/hydrateRoot) Omit it if you don't want to run React on the client at all.
68
-
* **optional** `bootstrapModules`: Like `bootstrapScripts`, but emits [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) instead.
69
-
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page. Must be the same prefix as passed to [`hydrateRoot`.](/reference/react-dom/client/hydrateRoot#parameters)
70
-
* **optional** `namespaceURI`: A string with the root [namespace URI](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#important_namespace_uris) for the stream. Defaults to regular HTML. Pass `'http://www.w3.org/2000/svg'` for SVG or `'http://www.w3.org/1998/Math/MathML'` for MathML.
71
-
* **optional** `nonce`: A [`nonce`](http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#nonce) string to allow scripts for [`script-src` Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src).
72
-
* **optional** `onAllReady`: A callback that fires when all rendering is complete, including both the [shell](#specifying-what-goes-into-the-shell) and all additional [content.](#streaming-more-content-as-it-loads) You can use this instead of `onShellReady` [for crawlers and static generation.](#waiting-for-all-content-to-load-for-crawlers-and-static-generation) If you start streaming here, you won't get any progressive loading. The stream will contain the final HTML.
73
-
* **optional** `onError`: A callback that fires whenever there is a server error, whether [recoverable](#recovering-from-errors-outside-the-shell) or [not.](#recovering-from-errors-inside-the-shell) By default, this only calls `console.error`. If you override it to [log crash reports,](#logging-crashes-on-the-server) make sure that you still call `console.error`. You can also use it to [adjust the status code](#setting-the-status-code) before the shell is emitted.
74
-
* **optional** `onShellReady`: A callback that fires right after the [initial shell](#specifying-what-goes-into-the-shell) has been rendered. You can [set the status code](#setting-the-status-code) and call `pipe` here to start streaming. React will [stream the additional content](#streaming-more-content-as-it-loads) after the shell along with the inline `<script>` tags that replace the HTML loading fallbacks with the content.
75
-
* **optional** `onShellError`: A callback that fires if there was an error rendering the initial shell. It receives the error as an argument. No bytes were emitted from the stream yet, and neither `onShellReady` nor `onAllReady` will get called, so you can [output a fallback HTML shell.](#recovering-from-errors-inside-the-shell)
76
-
* **optional** `progressiveChunkSize`: The number of bytes in a chunk. [Read more about the default heuristic.](https://github.com/facebook/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
Copy file name to clipboardExpand all lines: src/content/reference/react/useMemo.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1056,9 +1056,6 @@ Uygulamanızı gerçekte neyin yavaşlattığına dair gerçekçi bir fikir edin
1056
1056
1057
1057
---
1058
1058
1059
-
<<<<<<< HEAD
1060
-
### Başka bir Hook'un bağımlılığını memoize etme {/*memoizing-a-dependency-of-another-hook*/}
1061
-
=======
1062
1059
### Preventing an Effect from firing too often {/*preventing-an-effect-from-firing-too-often*/}
1063
1060
1064
1061
Sometimes, you might want to use a value inside an [Effect:](/learn/synchronizing-with-effects)
@@ -1136,8 +1133,7 @@ function ChatRoom({ roomId }) {
1136
1133
Now your code is simpler and doesn't need `useMemo`. [Learn more about removing Effect dependencies.](/learn/removing-effect-dependencies#move-dynamic-objects-and-functions-inside-your-effect)
1137
1134
1138
1135
1139
-
### Memoizing a dependency of another Hook {/*memoizing-a-dependency-of-another-hook*/}
1140
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
1136
+
### Başka bir Hook'un bağımlılığını memoize etme {/*memoizing-a-dependency-of-another-hook*/}
1141
1137
1142
1138
Doğrudan bileşen gövdesinde oluşturulan bir nesneye bağlı olan bir hesaplamanız olduğunu varsayalım:
Copy file name to clipboardExpand all lines: src/content/reference/react/useReducer.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,14 +51,9 @@ function MyComponent() {
51
51
52
52
#### Dikkat edilmesi gerekenler {/*caveats*/}
53
53
54
-
<<<<<<< HEAD
55
54
* `useReducer`, bir Hook olduğundan, yalnızca bileşeninizin **üst düzeyinde** veya kendi Hook'larınızda çağırabilirsiniz. Döngüler veya koşullar içinde çağıramazsınız. Buna ihtiyacınız varsa, yeni bir bileşen oluşturun ve state'i taşıyın.
56
-
* Strict Mode'da, React, [tesadüfi karışıklıkları bulmanıza yardımcı olmak için](#my-reducer-or-initializer-function-runs-twice) reducer ve başlatıcı fonksiyonunuzu **iki kez çağırır**. Bu, yalnızca geliştirme amaçlı bir davranıştır ve canlı ortamı etkilemez. Reducer ve başlatıcı fonksiyonlarınız saf halde ise (olmaları gerektiği gibi), bu mantığınızı etkilememelidir. Çağrılardan birinin sonucu yoksayılır.
57
-
=======
58
-
* `useReducer` is a Hook, so you can only call it **at the top level of your component** or your own Hooks. You can't call it inside loops or conditions. If you need that, extract a new component and move the state into it.
59
55
* The `dispatch` function has a stable identity, so you will often see it omitted from Effect dependencies, but including it will not cause the Effect to fire. If the linter lets you omit a dependency without errors, it is safe to do. [Learn more about removing Effect dependencies.](/learn/removing-effect-dependencies#move-dynamic-objects-and-functions-inside-your-effect)
60
-
* In Strict Mode, React will **call your reducer and initializer twice** in order to [help you find accidental impurities.](#my-reducer-or-initializer-function-runs-twice) This is development-only behavior and does not affect production. If your reducer and initializer are pure (as they should be), this should not affect your logic. The result from one of the calls is ignored.
61
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
56
+
* Strict Mode'da, React, [tesadüfi karışıklıkları bulmanıza yardımcı olmak için](#my-reducer-or-initializer-function-runs-twice) reducer ve başlatıcı fonksiyonunuzu **iki kez çağırır**. Bu, yalnızca geliştirme amaçlı bir davranıştır ve canlı ortamı etkilemez. Reducer ve başlatıcı fonksiyonlarınız saf halde ise (olmaları gerektiği gibi), bu mantığınızı etkilememelidir. Çağrılardan birinin sonucu yoksayılır.
Copy file name to clipboardExpand all lines: src/content/reference/react/useState.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,13 +85,9 @@ function handleClick() {
85
85
86
86
* React [state güncellemelerini toplu halde(batches) yapar.](/learn/queueing-a-series-of-state-updates) React, ekranı **tüm olay yöneticileri çalıştıktan** ve `set` fonksyionlarını çağırdıktan sonra günceller. Böylelikle tek bir olay sırasında olacak birden fazla yeniden render engellenmiş olur. Nadiren de olsa, örneğin DOM'a erişmek istediğinizde, React'ı ekranı erken güncellemeye zorlamak için [`flushSync`](/reference/react-dom/flushSync) kullanabilirsiniz.
87
87
88
-
<<<<<<< HEAD
89
-
* *Render sırasında* `set` fonksiyonu yalnızca mevcut render edilen bileşenin içinde çağırılabilir. React, bileşenin çıktısını görmezden gelecektir ve hemen yeni state ile birlikte render etmeyi deneyecektir. Bu modele nadiren ihtiyaç duyulur ama bunu *önceki render'lardan gelen bilgileri saklamak* için kullanabilirsiniz. [Aşağıdaki örneği inceleyin.](#storing-information-from-previous-renders)
90
-
=======
91
88
* The `set` function has a stable identity, so you will often see it omitted from Effect dependencies, but including it will not cause the Effect to fire. If the linter lets you omit a dependency without errors, it is safe to do. [Learn more about removing Effect dependencies.](/learn/removing-effect-dependencies#move-dynamic-objects-and-functions-inside-your-effect)
92
89
93
-
* Calling the `set` function *during rendering* is only allowed from within the currently rendering component. React will discard its output and immediately attempt to render it again with the new state. This pattern is rarely needed, but you can use it to **store information from the previous renders**. [See an example below.](#storing-information-from-previous-renders)
94
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
90
+
* *Render sırasında* `set` fonksiyonu yalnızca mevcut render edilen bileşenin içinde çağırılabilir. React, bileşenin çıktısını görmezden gelecektir ve hemen yeni state ile birlikte render etmeyi deneyecektir. Bu modele nadiren ihtiyaç duyulur ama bunu *önceki render'lardan gelen bilgileri saklamak* için kullanabilirsiniz. [Aşağıdaki örneği inceleyin.](#storing-information-from-previous-renders)
95
91
96
92
* Strict Modda React, [kazara oluşan saf olmayan şeyleri bulmanıza yardımcı olmak için](#my-initializer-or-updater-function-runs-twice) **güncelleyici fonksiyonunuzu iki defa** çağıracaktır. Bu sadece geliştirme sırasında görülen bir davranıştır ve son ürünü etkilemez. Eğer güncelleyici fonksiyonunuz saf ise (ki öyle olmalı), bu olması gereken davranışı etkilememelidir. Yapılan çağrılardan birinin sonucu görmezden gelinecektir.
Copy file name to clipboardExpand all lines: src/content/reference/react/useTransition.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,13 +80,9 @@ function TabContainer() {
80
80
81
81
*`startTransition`‘a ilettiğiniz fonksiyon, eşzamanlı olarak çalışabilecek bir fonksiyon olmalıdır. React, bu fonksiyonu hemen çalıştırır ve çalışırken gerçekleşen tüm state güncellemelerini transition olarak işaretler. Sonrasında daha fazla state güncellemesi yapmaya çalışırsanız (örneğin, bir zaman aşımında), bunlar transition olarak işaretlenmezler.
82
82
83
-
<<<<<<< HEAD
84
-
* Bir state güncelleme işlemi transition olarak işaretlendiğinde, diğer güncelleme işlemleri bu işlemi kesintiye uğratabilir. Örneğin, bir grafik bileşenini güncelleyen transition işlemi sırasında, grafik bileşeni tekrar render işlemi devam ederken bir giriş alanına yazmaya başlarsanız, React, giriş alanındaki güncellemeyi işledikten sonra tekrar render işlemini başlatır.
85
-
=======
86
83
* The `startTransition` function has a stable identity, so you will often see it omitted from Effect dependencies, but including it will not cause the Effect to fire. If the linter lets you omit a dependency without errors, it is safe to do. [Learn more about removing Effect dependencies.](/learn/removing-effect-dependencies#move-dynamic-objects-and-functions-inside-your-effect)
87
84
88
-
* A state update marked as a Transition will be interrupted by other state updates. For example, if you update a chart component inside a Transition, but then start typing into an input while the chart is in the middle of a re-render, React will restart the rendering work on the chart component after handling the input update.
89
-
>>>>>>> 9467bc58868e66c53ca9385c8531dcf7b02178c2
85
+
* Bir state güncelleme işlemi transition olarak işaretlendiğinde, diğer güncelleme işlemleri bu işlemi kesintiye uğratabilir. Örneğin, bir grafik bileşenini güncelleyen transition işlemi sırasında, grafik bileşeni tekrar render işlemi devam ederken bir giriş alanına yazmaya başlarsanız, React, giriş alanındaki güncellemeyi işledikten sonra tekrar render işlemini başlatır.
90
86
91
87
* Transition güncellemeleri, metin girişlerini kontrol etmek için kullanılamaz.
0 commit comments