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/reference/react/useDeferredValue.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,13 @@ function SearchPage() {
36
36
37
37
#### Parametreler {/*parameters*/}
38
38
39
-
*`value`: The value you want to defer. It can have any type.
40
-
***optional**`initialValue`: A value to use during the initial render of a component. If this option is omitted, `useDeferredValue`will not defer during the initial render, because there's no previous version of`value`that it can render instead.
39
+
*`value`: Ertelemek istediğiniz değer. Herhangi bir türde olabilir.
40
+
***isteğe bağlı**`initialValue`: Bir bileşenin ilk render'ı sırasında kullanılacak bir değer. Bu seçenek atlanırsa, `useDeferredValue`ilk render sırasında erteleme yapmaz, çünkü yerine render edebileceği bir önceki`value`versiyonu yoktur.
41
41
42
42
43
43
#### Dönüş değeri {/*returns*/}
44
44
45
-
-`currentValue`: During the initial render, the returned deferred value will be the `initialValue`, or the same as the value you provided. During updates, React will first attempt a re-render with the old value (so it will return the old value), and then try another re-render in the background with the new value (so it will return the updated value).
45
+
-`currentValue`: İlk render sırasında, döndürülen ertelenmiş değer `initialValue` olacaktır veya sağladığınız değerle aynı olur. Güncellemeler sırasında, React önce eski değerle yeniden render yapmayı dener (bu yüzden eski değeri döndürecektir), ardından arka planda yeni değerle bir başka yeniden render yapmayı dener (bu yüzden güncellenmiş değeri döndürecektir).
Copy file name to clipboardExpand all lines: src/content/reference/react/useImperativeHandle.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,15 +38,15 @@ function MyInput({ ref }) {
38
38
39
39
#### Parametreler {/*parameters*/}
40
40
41
-
* `ref`: The `ref` you received as a prop to the `MyInput` component.
41
+
* `ref`: `MyInput` bileşenine prop olarak aldığınız `ref`.
42
42
43
43
* `createHandle`: Herhangi bir argüman almayan ve açığa çıkarmak istediğiniz ref tanımlayıcısını döndüren bir fonksiyondur. Bu ref tanımlayıcısı herhangi bir tipte olabilir. Genellikle, açığa çıkarmak istediğiniz metotların bulunduğu bir nesne döndürürsünüz.
44
44
45
45
* **isteğe bağlı** `dependencies`: `createHandle` kodu içinde referans alınan tüm tepkisel değerlerin listesidir. Tepkisel değerler, prop'lar, state ve bileşeninizin doğrudan içerisinde bildirilen tüm değişkenler ve fonskiyonlar gibi değerleri içerir. Eğer linter'ınız [React için yapılandırılmışsa](/learn/editor-setup#linting), her tepkisel değerin doğru bir şekilde bağımlılık(dependency) olarak belirtildiğini doğrular. Bağımlılık listesi, sabit bir sayıda öğeye sahip olmalı ve `[dep1, dep2, dep3]` gibi iç içe yazılmalıdır. React, her bir bağımlılığı önceki değeriyle [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) karşılaştırması kullanarak karşılaştırır. Eğer bir yeniden render'lama, bazı bağımlılıklarda değişikliğe neden olduysa veya bu argümanı atladıysanız, `createHandle` fonksiyonunuz yeniden çalıştırılır ve yeni oluşturulan tanımlayıcı ref'e atanır.
46
46
47
47
<Note>
48
48
49
-
Starting with React 19, [`ref`is available a prop.](/blog/2024/12/05/react-19#ref-as-a-prop) In React 18 and earlier, it was necessary to get the `ref` from [`forwardRef`.](/reference/react/forwardRef)
49
+
React 19 ile birlikte, [`ref`bir prop olarak mevcuttur.](/blog/2024/12/05/react-19#ref-as-a-prop) React 18 ve öncesinde, `ref`'i [`forwardRef`'den](/reference/react/forwardRef) almak gerekiyordu.
50
50
51
51
</Note>
52
52
@@ -60,15 +60,15 @@ Starting with React 19, [`ref` is available a prop.](/blog/2024/12/05/react-19#r
60
60
61
61
### Özel bir ref tanımlayıcısını üst elemana açığa çıkarma {/*exposing-a-custom-ref-handle-to-the-parent-component*/}
62
62
63
-
To expose a DOM node to the parent element, pass in the `ref` prop to the node.
63
+
Bir DOM düğümünü ebeveyn elemana açığa çıkarmak için, `ref` prop'unu düğüme iletin.
64
64
65
65
```js {2}
66
66
functionMyInput({ ref }) {
67
67
return<input ref={ref} />;
68
68
};
69
69
```
70
70
71
-
With the code above, [a ref to `MyInput` will receive the`<input>` DOM node.](/learn/manipulating-the-dom-with-refs) However, you can expose a custom value instead. To customize the exposed handle, call `useImperativeHandle`at the top level of your component:
71
+
Yukarıdaki kodla, [`MyInput`'e ait bir ref,`<input>` DOM düğümünü alacaktır.](/learn/manipulating-the-dom-with-refs) Ancak bunun yerine özel bir değer de açığa çıkarabilirsiniz. Açığa çıkan handle'ı özelleştirmek için, bileşeninizin üst seviyesinde `useImperativeHandle`çağırın:
72
72
73
73
```js {4-8}
74
74
import { useImperativeHandle } from'react';
@@ -84,7 +84,7 @@ function MyInput({ ref }) {
84
84
};
85
85
```
86
86
87
-
Note that in the code above, the `ref` is no longer passed to the `<input>`.
87
+
Yukarıdaki kodda, `ref`'in artık `<input>`'a iletilmediğine dikkat edin.
88
88
89
89
Örneğin, `<input>` DOM düğümünün tamamını açığa çıkarmak istemiyorsunuz, ancak `focus` ve `scrollIntoView` gibi iki metodu açığa çıkarmak istiyorsunuz. Bunun için gerçek tarayıcı DOM'unu ayrı bir ref içinde tutun. Ardından, yalnızca üst elemanın çağırmasını istediğiniz metotlara sahip bir tanımlayıcıyı açığa çıkarmak için `useImperativeHandle`'ı kullanın:
#### Kendi bileşeninize bir ref'i açığa çıkarma {/*exposing-a-ref-to-your-own-component*/}
451
451
452
-
Sometimes, you may want to let the parent component manipulate the DOM inside of your component. For example, maybe you're writing a `MyInput`component, but you want the parent to be able to focus the input (which the parent has no access to). You can create a `ref`in the parent and pass the `ref` as prop to the child component. Read a [detailed walkthrough](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes) here.
452
+
Bazen, ebeveyn bileşenin, bileşeninizin içindeki DOM'u manipüle etmesine izin vermek isteyebilirsiniz. Örneğin, belki bir `MyInput`bileşeni yazıyorsunuz, ancak ebeveynin input'a odaklanabilmesini (ebeveynin buna erişimi yoktur) istiyorsunuz. Ebeveyn içinde bir `ref` oluşturabilir ve `ref`'i prop olarak çocuk bileşene iletebilirsiniz. [Detaylı bir rehber için buraya bakın.](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes)
453
453
454
454
<Sandpack>
455
455
@@ -556,7 +556,7 @@ Konsolda bir hata alabilirsiniz:
And then add `ref` to the list ofprops your component accepts and pass `ref` as a prop to the relevent child [built-in component](/reference/react-dom/components/common) like this:
578
+
Ve ardından `ref`'i, bileşeninizin kabul ettiği props listesine ekleyin ve `ref`'i ilgili [yerleşik bileşene](/reference/react-dom/components/common) prop olarak iletin, şöyle:
0 commit comments