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/manipulating-the-dom-with-refs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,7 @@ Bunun nedeni **Hook'ların bileşeninizin sadece en üst seviyesinde çağrılma
211
211
212
212
Bunun olası bir yolu ana elemana tek bir ref almak ve ardından tek tek alt elemanı bulmak için [`querySelectorAll`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) gibi DOM manipülasyon yöntemlerini kullanmaktır. Ancak bu yöntem tutarsızdır ve DOM yapınız değişirse işlevsiz hale gelebilir.
213
213
214
-
Another solution is to **pass a function to the `ref` attribute.**This is called a [`ref` callback.](/reference/react-dom/components/common#ref-callback) React will call your ref callback with the DOM node when it's time to set the ref, and call the cleanup function returned from the callback when it's time to clear it. This lets you maintain your own array or a[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), and access any ref by its index or some kind of ID.
214
+
Başka bir çözüm, **`ref` attribute’una bir fonksiyon geçmektir.**Buna [`ref` callback](/reference/react-dom/components/common#ref-callback)denir. React, `ref` callback’inizi ayarlama zamanı geldiğinde DOM node ile çağırır ve temizleme zamanı geldiğinde callback’ten dönen cleanup fonksiyonunu çağırır. Bu, kendi array’inizi veya bir[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) yapınızı korumanıza ve herhangi bir `ref`’e index veya bir tür ID ile erişmenize olanak tanır.
215
215
216
216
Bu örnek uzun bir listede rastgele bir elemana kaydırmak için bu yaklaşımı nasıl kullanabileceğimizi gösterir:
Copy file name to clipboardExpand all lines: src/content/learn/reusing-logic-with-custom-hooks.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1421,13 +1421,7 @@ Bir [tasarım sistemine](https://uxdesign.cc/everything-you-need-to-know-about-d
1421
1421
1422
1422
#### React veri getirme için herhangi bir yerleşik çözüm sağlayacak mı? {/*will-react-provide-any-built-in-solution-for-data-fetching*/}
1423
1423
1424
-
<<<<<<< HEAD
1425
-
Detaylar üzerine çalışmaya devam ediyoruz, ancak gelecekte veri getirmeyi şu şekilde yazmanızı bekliyoruz:
1426
-
1427
-
```js {1,4,6}
1428
-
import { use } from 'react'; // Henüz mevcut değil!
1429
-
=======
1430
-
Today, with the [`use`](/reference/react/use#streaming-data-from-server-to-client) API, data can be read in render by passing a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) to `use`:
1424
+
Bugün, [`use`](/reference/react/use#streaming-data-from-server-to-client) API’si ile, bir [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) `use`’a geçirilerek render sırasında veri okunabilir:
1431
1425
1432
1426
```js {1,4,11}
1433
1427
import { use, Suspense } from "react";
@@ -1450,7 +1444,6 @@ We're still working out the details, but we expect that in the future, you'll wr
`tsconfig.json` dosyanızda aşağıdaki derleyici seçeneklerinin ayarlanması gerekir::
39
39
40
-
<<<<<<< HEAD
41
-
1.`dom`, [`lib`](https://www.typescriptlang.org/tsconfig/#lib)'e dahil edilmelidir (Not: Eğer `lib` seçeneği belirtilmemişse, `dom` varsayılan olarak dahil edilir).
42
-
1.[`jsx`](https://www.typescriptlang.org/tsconfig/#jsx) geçerli seçeneklerden birine ayarlanmalıdır. Çoğu uygulama için `preserve` yeterli olacaktır.
43
-
Eğer bir kütüphane yayımlıyorsanız, hangi değeri seçeceğiniz konusunda
44
-
If you're publishing a library, consult the [`jsx` documentation](https://www.typescriptlang.org/tsconfig/#jsx) başvurun.
45
-
=======
46
-
1.`dom` must be included in [`lib`](https://www.typescriptlang.org/tsconfig/#lib) (Note: If no `lib` option is specified, `dom` is included by default).
47
-
2.[`jsx`](https://www.typescriptlang.org/tsconfig/#jsx) must be set to one of the valid options. `preserve` should suffice for most applications.
48
-
If you're publishing a library, consult the [`jsx` documentation](https://www.typescriptlang.org/tsconfig/#jsx) on what value to choose.
49
-
>>>>>>> d34c6a2c6fa49fc6f64b07aa4fa979d86d41c4e8
40
+
1.[`lib`](https://www.typescriptlang.org/tsconfig/#lib) içinde `dom` bulunmalıdır (Not: Eğer `lib` seçeneği belirtilmezse, `dom` varsayılan olarak dahildir).
41
+
2.[`jsx`](https://www.typescriptlang.org/tsconfig/#jsx), geçerli seçeneklerden birine ayarlanmalıdır. Çoğu uygulama için `preserve` yeterli olacaktır.
42
+
Eğer bir kütüphane yayımlıyorsanız, hangi değeri seçeceğinizi öğrenmek için [`jsx` dokümantasyonuna](https://www.typescriptlang.org/tsconfig/#jsx) bakın.
50
43
51
44
## React Bileşenleri ile TypeScript {/*typescript-with-react-components*/}
Copy file name to clipboardExpand all lines: src/content/reference/react/StrictMode.md
+3-37Lines changed: 3 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,15 +222,10 @@ li {
222
222
223
223
</Sandpack>
224
224
225
-
<<<<<<< HEAD
226
-
Yukardaki kodda ilk çıktı doğru olduğu için gözden kaçırmanın çok kolay olduğu bir hata bulunmaktadır.
227
-
=======
228
-
There is a mistake in the code above. However, it is easy to miss because the initial output appears correct.
225
+
Yukarıdaki kodda bir hata var. Ancak ilk çıktının doğru görünmesi nedeniyle fark etmesi kolay değildir.
229
226
230
-
This mistake will become more noticeable if the `StoryTray` component re-renders multiple times. For example, let's make the `StoryTray` re-render with a different background color whenever you hover over it:
231
-
>>>>>>> d34c6a2c6fa49fc6f64b07aa4fa979d86d41c4e8
227
+
Bu hata, `StoryTray` bileşeni birden fazla kez render edilirse daha çok göze çarpar. Örneğin, `StoryTray`'i imleç ile üzerine geldiğinizde arka plan rengi değişecek şekilde yeniden render edelim:
232
228
233
-
Bu hata `StoryTray` bileşeni birden fazla kez render edilirse daha çok göze çarpar. Örneğin, `StoryTray`'i imleç ile üzerine geldiğinizde arka plan rengi değişecek şekilde yeniden render edelim:
234
229
<Sandpack>
235
230
236
231
```js src/index.js
@@ -1162,29 +1157,6 @@ export default function CatFriends() {
1162
1157
</nav>
1163
1158
<div>
1164
1159
<ul>
1165
-
<<<<<<<HEAD
1166
-
{animals.map((animal) => (
1167
-
<li
1168
-
key={animal.src}
1169
-
ref={(node) => {
1170
-
constlist=itemsRef.current;
1171
-
constitem= {animal, node};
1172
-
list.push({animal: animal, node});
1173
-
console.log(`✅ Haritaya hayvan ekleniyor. Toplam hayvan sayısı: ${list.length}`);
1174
-
if (list.length>10) {
1175
-
console.log('❌ Listede çok fazla hayvan var!');
1176
-
}
1177
-
return () => {
1178
-
list.splice(list.indexOf(item));
1179
-
console.log(`❌ Haritadan hayvan çıkarılıyor. Toplam hayvan sayısı: ${itemsRef.current.length}`);
1180
-
}
1181
-
}}
1182
-
>
1183
-
<img src={animal.src} />
1184
-
</li>
1185
-
))}
1186
-
1187
-
=======
1188
1160
{cats.map((cat) => (
1189
1161
<li
1190
1162
key={cat.src}
@@ -1205,7 +1177,6 @@ export default function CatFriends() {
1205
1177
<img src={cat.src} />
1206
1178
</li>
1207
1179
))}
1208
-
>>>>>>> d34c6a2c6fa49fc6f64b07aa4fa979d86d41c4e8
1209
1180
</ul>
1210
1181
</div>
1211
1182
</>
@@ -1269,13 +1240,8 @@ Artık StrictMode'da ilk mount sırasında, ref geri çağırmaları tamamen kur
1269
1240
1270
1241
Strict Mode olmadan, hatayı fark edene kadar uygulamada tıklamadan bozuk özellikleri gözlemlemek zordu. Strict Mode, hataları hemen görünür hale getirdi, böylece bunları üretime göndermeden önce fark edebilirsiniz.
1271
1242
1272
-
<<<<<<< HEAD
1273
-
---
1274
-
### Strict Mode tarafından etkinleştirilen deprecation uyarılarını düzeltme {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
1275
-
=======
1276
1243
---
1277
-
### Fixing deprecation warnings enabled by Strict Mode {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
1278
-
>>>>>>> d34c6a2c6fa49fc6f64b07aa4fa979d86d41c4e8
1244
+
### Strict Mode ile etkinleştirilen kullanım dışı (deprecation) uyarılarını düzeltme {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
1279
1245
1280
1246
React, `<StrictMode>` içindeki herhangi bir bileşende aşağıdaki kullanımdan kaldırılan API'lardan biri kullanılıyorsa sizi uyarır:
0 commit comments