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/preserving-and-resetting-state.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -689,11 +689,9 @@ label {
689
689
690
690
</Sandpack>
691
691
692
-
<<<<<<< HEAD
692
+
693
693
Sayaç state'i kutucuğa tıkladığınız zaman sıfırlanır. `Counter` render etmenize rağmen, `div`'in ilk alt elemanı `div`'den `section`'a dönüşür. Alt eleman olan `div` DOM'dan kaldırıldığında, altındaki ağacın tamamı da (`Counter` ve state'i de dahil olmak üzere) yok edilir.
694
-
=======
695
-
The counter state gets reset when you click the checkbox. Although you render a `Counter`, the first child of the `div` changes from a `section` to a `div`. When the child `section` was removed from the DOM, the whole tree below it (including the `Counter` and its state) was destroyed as well.
Copy file name to clipboardExpand all lines: src/content/learn/referencing-values-with-refs.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
@@ -470,11 +470,7 @@ export default function Toggle() {
470
470
471
471
#### Debouncing'i düzeltin {/*fix-debouncing*/}
472
472
473
-
<<<<<<< HEAD
474
473
Bu örnekte tüm buton tıklama işleyicileri ["debounce edilmiştir"](https://redd.one/blog/debounce-vs-throttle). Bunun ne anlama geldiğini görmek için bir butona basın. Mesajın bir saniye sonra göründüğünü fark edeceksiniz. Mesajı beklerken düğmeye basarsanız, zamanlayıcı sıfırlanır. Yani aynı düğmeye hızlıca birkaç kez tıklamaya devam ederseniz, mesaj tıklamayı bıraktıktan bir saniye sonra görünecektir. Debouncing, kullanıcının "bir şeyler yapmayı durdurana kadar" bazı eylemleri geciktirmenizi sağlar.
475
-
=======
476
-
In this example, all button click handlers are ["debounced".](https://kettanaito.com/blog/debounce-vs-throttle) To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things".
477
-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
478
474
479
475
Örnek çalışıyor, fakat tam olarak istenildiği gibi değil. Butonlar birbirinden bağımsız değil. Problemi görmek için bir butona basın ve ardından hemen başka bir butona basın. Biraz bekledikten sonra her iki butonun de mesajını görmeyi beklersiniz. Fakat sadece son butonun mesajı görünüyor. İlk basılan butonun mesajı kayboluyor.
Portalları kullanırken uygulamanızın erişilebilir olduğundan emin olmanız önemlidir. Örneğin, kullanıcının odağı doğal bir şekilde portalın içine ve dışına taşıyabilmesi için klavye odağını yönetmeniz gerekebilir.
242
242
243
-
<<<<<<< HEAD
244
243
Modal'lar oluştururken [WAI-ARIA Modal Yazma Uygulamaları](https://www.w3.org/WAI/ARIA/apg/#dialog_modal) kılavuzunu izleyiniz. Bir topluluk paketi kullanıyorsanız, erişilebilir olduğundan ve bu yönergeleri izlediğinden emin olun.
245
-
=======
246
-
Follow the [WAI-ARIA Modal Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal) when creating modals. If you use a community package, ensure that it is accessible and follows these guidelines.
*[`createContext`](/reference/react/createContext), context tanımlamanıza ve alt bileşenlere iletmenizi sağlar. [`useContext`](/reference/react/useContext) ile birlikte kullanılır.
15
14
*[`forwardRef`](/reference/react/forwardRef), bir DOM düğümünü üst bileşene ref olarak göstermenizi sağlar. [`useRef`](/reference/react/useRef) ile birlikte kullanılır.
16
15
*[`lazy`](/reference/react/lazy), bileşen kodunun yüklenmesini ilk kez render edilene kadar ertelemenizi sağlar.
17
16
*[`memo`](/reference/react/memo), bileşeninizin aynı prop'larla yeniden render edilmesini engellemenizi sağlar. [`useMemo`](/reference/react/useMemo) ve [`useCallback`](/reference/react/useCallback) ile birlikte kullanılır.
18
17
*[`startTransition`](/reference/react/startTransition), state güncellemesini acil olmadığını belirtecek şekilde işaretlemenizi sağlar. [`useTransition`](/reference/react/useTransition)'a benzerdir.
19
18
*[`act`](/reference/react/act) doğrulamalarınızı (assertions) yapmadan önce önce güncellemelerin işlendiğinden emin olmak için testlerinizdeki renderları ve etkileşimleri sarmalamanıza olanak tanır.
20
-
=======
21
-
*[`createContext`](/reference/react/createContext) lets you define and provide context to the child components. Used with [`useContext`.](/reference/react/useContext)
22
-
*[`lazy`](/reference/react/lazy) lets you defer loading a component's code until it's rendered for the first time.
23
-
*[`memo`](/reference/react/memo) lets your component skip re-renders with same props. Used with [`useMemo`](/reference/react/useMemo) and [`useCallback`.](/reference/react/useCallback)
24
-
*[`startTransition`](/reference/react/startTransition) lets you mark a state update as non-urgent. Similar to [`useTransition`.](/reference/react/useTransition)
25
-
*[`act`](/reference/react/act) lets you wrap renders and interactions in tests to ensure updates have processed before making assertions.
**Context nesnesinin kendisi herhangi bir bilgi içermez.** Diğer bileşenlerin _hangi_ contexti okuyacağını veya sağlayacağını temsil eder. Genellikle, context değerini belirtmek için bileşenin üstünde [SomeContext.Provider](https://react.dev/reference/react/createContext#provider) kullanır ve bileşenin altında okumak için [useContext(SomeContext)](https://react.dev/reference/react/useContext) çağırırsınız. Context nesnesinin birkaç özelliği vardır:
43
42
44
43
*`SomeContext.Provider` bilenşenlerin context değerini sağlamanıza olanak tanır.
45
44
*`SomeContext.Consumer` context değerini okumak için nadiren kullanılan alternatif bir yöntemdir.
46
-
=======
47
-
**The context object itself does not hold any information.** It represents _which_ context other components read or provide. Typically, you will use [`SomeContext`](#provider) in components above to specify the context value, and call [`useContext(SomeContext)`](/reference/react/useContext) in components below to read it. The context object has a few properties:
48
-
49
-
*`SomeContext` lets you provide the context value to components.
50
-
*`SomeContext.Consumer` is an alternative and rarely used way to read the context value.
51
-
*`SomeContext.Provider` is a legacy way to provide the context value before React 19.
52
-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
53
45
54
46
---
55
47
@@ -69,19 +61,15 @@ function App() {
69
61
}
70
62
```
71
63
72
-
<<<<<<< HEAD
73
-
#### Proplar {/*provider-props*/}
74
-
=======
75
64
<Note>
76
65
77
-
Starting in React 19, you can render `<SomeContext>`as a provider.
66
+
React 19'dan itibaren, `<SomeContext>`öğesini bir sağlayıcı olarak oluşturabilirsiniz.
78
67
79
-
In older versions of React, use `<SomeContext.Provider>`.
68
+
React'in eski sürümlerinde `<SomeContext.Provider>` kullanın.
80
69
81
70
</Note>
82
71
83
72
#### Props {/*provider-props*/}
84
-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
85
73
86
74
*`value`: Ne kadar derin olursa olsun, bu sağlayıcının içindeki contexti okuyan tüm bileşenlere aktarmak istediğiniz değer. Context değeri herhangi bir türde olabilir. Sağlayıcı içinde [`useContext(SomeContext)`](/reference/react/useContext) kullanan bir bileşen,
87
75
üzerindeki en içte bulunan ilgili context sağlayıcısının `value` değerini alır.
Bu değer asla değişmez. React, yalnızca eşleşen bir sağlayıcı bulamazsa bu değeri bir geri dönüş olarak kullanır.
237
225
238
-
<<<<<<< HEAD
239
226
Contextin zaman içinde değişmesini sağlamak için, [state ekleyin ve bileşenleri context sağlayıcısıyla sarın.](/reference/react/useContext#updating-data-passed-via-context)
240
227
241
-
=======
242
-
To make context change over time, [add state and wrap components in a context provider.](/reference/react/useContext#updating-data-passed-via-context)
Copy file name to clipboardExpand all lines: src/content/reference/react/legacy.md
-9Lines changed: 0 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,18 +27,9 @@ Bu API'ler `react` paketinden export edilir, ancak yeni yazılmış kodlarda kul
27
27
28
28
Bu API'ler React 19'da kaldırıldı:
29
29
30
-
<<<<<<< HEAD
31
30
*[`createFactory`](https://18.react.dev/reference/react/createFactory): bunun yerine JSX kullanın.
32
31
* Sınıf Bileşenleri: [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): bunun yerine [`static contextType`](#static-contexttype) kullanın.
33
32
* Sınıf Bileşenleri: [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): bunun yerine [`static contextType`](#static-contexttype) kullanın.
34
33
* Sınıf Bileşenleri: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): bunun yerine [`Context.Provider`](/reference/react/createContext#provider) kullanın.
35
34
* Sınıf Bileşenleri: [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): bunun yerine [TypeScript](https://www.typescriptlang.org/) gibi bir tip sistemi kullanın.
36
35
* Sınıf Bileşenleri: [`this.refs`](https://18.react.dev//reference/react/Component#refs): bunun yerine [`createRef`](/reference/react/createRef) kullanın.
37
-
=======
38
-
*[`createFactory`](https://18.react.dev/reference/react/createFactory): use JSX instead.
39
-
* Class Components: [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): use [`static contextType`](#static-contexttype) instead.
40
-
* Class Components: [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): use [`static contextType`](#static-contexttype) instead.
41
-
* Class Components: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): use [`Context`](/reference/react/createContext#provider) instead.
42
-
* Class Components: [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): use a type system like [TypeScript](https://www.typescriptlang.org/) instead.
43
-
* Class Components: [`this.refs`](https://18.react.dev//reference/react/Component#refs): use [`createRef`](/reference/react/createRef) instead.
0 commit comments