Skip to content

Commit 00117dc

Browse files
committed
Translate isValidElement API reference page to Turkish
Translates the complete isValidElement page including: - Intro, parameters, return values, and caveats sections - Usage examples with Turkish descriptions - Deep dive section on React elements vs React nodes Consistent with existing Turkish translation style used in createElement.md and cloneElement.md pages. Related to #397
1 parent 6af9c8a commit 00117dc

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

src/content/reference/react/isValidElement.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: isValidElement
44

55
<Intro>
66

7-
`isValidElement` checks whether a value is a React element.
7+
`isValidElement` bir değerin React elemanı olup olmadığını kontrol eder.
88

99
```js
1010
const isElement = isValidElement(value)
@@ -16,72 +16,72 @@ const isElement = isValidElement(value)
1616

1717
---
1818

19-
## Reference {/*reference*/}
19+
## Başvuru Dokümanı {/*reference*/}
2020

2121
### `isValidElement(value)` {/*isvalidelement*/}
2222

23-
Call `isValidElement(value)` to check whether `value` is a React element.
23+
Bir `value` değerinin React elemanı olup olmadığını kontrol etmek için `isValidElement(value)` çağrısı yapın.
2424

2525
```js
2626
import { isValidElement, createElement } from 'react';
2727

28-
// ✅ React elements
28+
// ✅ React elemanları
2929
console.log(isValidElement(<p />)); // true
3030
console.log(isValidElement(createElement('p'))); // true
3131

32-
//Not React elements
32+
// ❌ React elemanı olmayan değerler
3333
console.log(isValidElement(25)); // false
3434
console.log(isValidElement('Hello')); // false
3535
console.log(isValidElement({ age: 42 })); // false
3636
```
3737

38-
[See more examples below.](#usage)
38+
[Aşağıda daha fazla örneğe bakın.](#usage)
3939

40-
#### Parameters {/*parameters*/}
40+
#### Parametreler {/*parameters*/}
4141

42-
* `value`: The `value` you want to check. It can be any a value of any type.
42+
* `value`: Kontrol etmek istediğiniz `value` değeri. Herhangi bir türde değer olabilir.
4343

44-
#### Returns {/*returns*/}
44+
#### Dönüş Değeri {/*returns*/}
4545

46-
`isValidElement` returns `true` if the `value` is a React element. Otherwise, it returns `false`.
46+
`isValidElement`, `value` bir React elemanıysa `true` döndürür. Aksi takdirde `false` döndürür.
4747

48-
#### Caveats {/*caveats*/}
48+
#### Uyarılar {/*caveats*/}
4949

50-
* **Only [JSX tags](/learn/writing-markup-with-jsx) and objects returned by [`createElement`](/reference/react/createElement) are considered to be React elements.** For example, even though a number like `42` is a valid React *node* (and can be returned from a component), it is not a valid React element. Arrays and portals created with [`createPortal`](/reference/react-dom/createPortal) are also *not* considered to be React elements.
50+
* **Yalnızca [JSX etiketleri](/learn/writing-markup-with-jsx) ve [`createElement`](/reference/react/createElement) tarafından döndürülen nesneler React elemanı olarak kabul edilir.** Örneğin, `42` gibi bir sayı geçerli bir React *node'u* olsa da (ve bir bileşenden döndürülebilse de), geçerli bir React elemanı değildir. [`createPortal`](/reference/react-dom/createPortal) ile oluşturulan diziler ve portal'lar da React elemanı olarak *kabul edilmez*.
5151

5252
---
5353

54-
## Usage {/*usage*/}
54+
## Kullanım {/*usage*/}
5555

56-
### Checking if something is a React element {/*checking-if-something-is-a-react-element*/}
56+
### Bir şeyin React elemanı olup olmadığını kontrol etme {/*checking-if-something-is-a-react-element*/}
5757

58-
Call `isValidElement` to check if some value is a *React element.*
58+
Bir değerin *React elemanı* olup olmadığını kontrol etmek için `isValidElement` çağrısı yapın.
5959

60-
React elements are:
60+
React elemanları şunlardır:
6161

62-
- Values produced by writing a [JSX tag](/learn/writing-markup-with-jsx)
63-
- Values produced by calling [`createElement`](/reference/react/createElement)
62+
- [JSX etiketi](/learn/writing-markup-with-jsx) yazılarak üretilen değerler
63+
- [`createElement`](/reference/react/createElement) çağrılarak üretilen değerler
6464

65-
For React elements, `isValidElement` returns `true`:
65+
React elemanları için `isValidElement`, `true` döndürür:
6666

6767
```js
6868
import { isValidElement, createElement } from 'react';
6969

70-
// ✅ JSX tags are React elements
70+
// ✅ JSX etiketleri React elemanlarıdır
7171
console.log(isValidElement(<p />)); // true
7272
console.log(isValidElement(<MyComponent />)); // true
7373

74-
//Values returned by createElement are React elements
74+
//createElement tarafından döndürülen değerler React elemanlarıdır
7575
console.log(isValidElement(createElement('p'))); // true
7676
console.log(isValidElement(createElement(MyComponent))); // true
7777
```
7878

79-
Any other values, such as strings, numbers, or arbitrary objects and arrays, are not React elements.
79+
Dizeler, sayılar veya rastgele nesneler ve diziler gibi diğer tüm değerler React elemanı değildir.
8080

81-
For them, `isValidElement` returns `false`:
81+
Bunlar için `isValidElement`, `false` döndürür:
8282

8383
```js
84-
//These are *not* React elements
84+
//Bunlar React elemanı *değildir*
8585
console.log(isValidElement(null)); // false
8686
console.log(isValidElement(25)); // false
8787
console.log(isValidElement('Hello')); // false
@@ -90,39 +90,39 @@ console.log(isValidElement([<div />, <div />])); // false
9090
console.log(isValidElement(MyComponent)); // false
9191
```
9292

93-
It is very uncommon to need `isValidElement`. It's mostly useful if you're calling another API that *only* accepts elements (like [`cloneElement`](/reference/react/cloneElement) does) and you want to avoid an error when your argument is not a React element.
93+
`isValidElement`'e ihtiyaç duymanız oldukça nadir bir durumdur. En çok, yalnızca eleman kabul eden başka bir API çağırdığınızda ([`cloneElement`](/reference/react/cloneElement) gibi) ve argümanınız bir React elemanı olmadığında oluşacak hatayı önlemek istediğinizde faydalıdır.
9494

95-
Unless you have some very specific reason to add an `isValidElement` check, you probably don't need it.
95+
`isValidElement` kontrolü eklemeniz için çok özel bir nedeniniz olmadıkça, muhtemelen buna ihtiyacınız yoktur.
9696

9797
<DeepDive>
9898

99-
#### React elements vs React nodes {/*react-elements-vs-react-nodes*/}
99+
#### React elemanları ve React node'ları {/*react-elements-vs-react-nodes*/}
100100

101-
When you write a component, you can return any kind of *React node* from it:
101+
Bir bileşen yazdığınızda, herhangi bir *React node'u* döndürebilirsiniz:
102102

103103
```js
104104
function MyComponent() {
105-
// ... you can return any React node ...
105+
// ... herhangi bir React node'u döndürebilirsiniz ...
106106
}
107107
```
108108

109-
A React node can be:
109+
Bir React node'u şunlardan biri olabilir:
110110

111-
- A React element created like `<div />` or `createElement('div')`
112-
- A portal created with [`createPortal`](/reference/react-dom/createPortal)
113-
- A string
114-
- A number
115-
- `true`, `false`, `null`, or `undefined` (which are not displayed)
116-
- An array of other React nodes
111+
- `<div />` veya `createElement('div')` ile oluşturulan bir React elemanı
112+
- [`createPortal`](/reference/react-dom/createPortal) ile oluşturulan bir portal
113+
- Bir dize (string)
114+
- Bir sayı (number)
115+
- `true`, `false`, `null` veya `undefined` (bunlar görüntülenmez)
116+
- Diğer React node'larından oluşan bir dizi
117117

118-
**Note `isValidElement` checks whether the argument is a *React element,* not whether it's a React node.** For example, `42` is not a valid React element. However, it is a perfectly valid React node:
118+
**`isValidElement`, argümanın bir *React elemanı* olup olmadığını kontrol eder, bir React node'u olup olmadığını değil.** Örneğin, `42` geçerli bir React elemanı değildir. Ancak mükemmel bir şekilde geçerli bir React node'udur:
119119

120120
```js
121121
function MyComponent() {
122-
return 42; // It's ok to return a number from component
122+
return 42; // Bir bileşenden sayı döndürmek sorun değildir
123123
}
124124
```
125125

126-
This is why you shouldn't use `isValidElement` as a way to check whether something can be rendered.
126+
Bu nedenle, bir şeyin render edilip edilemeyeceğini kontrol etmek için `isValidElement` kullanmamalısınız.
127127

128128
</DeepDive>

0 commit comments

Comments
 (0)