Skip to content

Commit 0257d8a

Browse files
committed
rules-of-hooks
1 parent 02b6f01 commit 0257d8a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/content/reference/rules/rules-of-hooks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ Hook'lar JavaScript fonksiyonları kullanılarak tanımlanır, ancak nerede ça
2121

2222
```js{2-3,8-9}
2323
function Counter() {
24-
// ✅ Good: top-level in a function component
24+
// ✅ İyi: bir işlev bileşeninde üst düzey
2525
const [count, setCount] = useState(0);
2626
// ...
2727
}
2828
2929
function useWindowWidth() {
30-
// ✅ Good: top-level in a custom Hook
30+
// ✅ İyi: özel bir Hook içinde üst düzey
3131
const [width, setWidth] = useState(window.innerWidth);
3232
// ...
3333
}
3434
```
3535

36-
It’s **not** supported to call Hooks (functions starting with `use`) in any other cases, for example:
36+
Hook'ları (`use` ile başlayan fonksiyonlar) başka herhangi bir durumda çağırmak **desteklenmez**, örneğin:
3737

38-
* 🔴 Do not call Hooks inside conditions or loops.
38+
* 🔴 Hook'ları koşulların veya döngülerin içinde çağırmayın.
3939
* 🔴 Do not call Hooks after a conditional `return` statement.
4040
* 🔴 Do not call Hooks in event handlers.
4141
* 🔴 Do not call Hooks in class components.

0 commit comments

Comments
 (0)