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/blog/index.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
@@ -7,7 +7,7 @@ title: React Blog
7
7
8
8
This blog is the official source for the updates from the React team. Anything important, including release notes or deprecation notices, will be posted here first.
9
9
10
-
You can also follow the [@react.dev](https://bsky.app/profiles/react.js) account on Bluesky, or [@reactjs](https://twitter.com/reactjs) account on Twitter, but you won’t miss anything essential if you only read this blog.
10
+
You can also follow the [@react.dev](https://bsky.app/profile/react.dev) account on Bluesky, or [@reactjs](https://twitter.com/reactjs) account on Twitter, but you won’t miss anything essential if you only read this blog.
Copy file name to clipboardExpand all lines: src/content/learn/passing-data-deeply-with-context.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
@@ -468,15 +468,15 @@ import { LevelContext } from './LevelContext.js';
468
468
exportdefaultfunctionSection({ level, children }) {
469
469
return (
470
470
<section className="section">
471
-
<LevelContext.Provider value={level}>
471
+
<LevelContext value={level}>
472
472
{children}
473
-
</LevelContext.Provider>
473
+
</LevelContext>
474
474
</section>
475
475
);
476
476
}
477
477
```
478
478
479
-
Bu React'a şunu söyler: "`<Section>` içindeki herhangi bir eleman,`LevelContext`'i istediğinde, ona bu `level` değerini ver." Bileşen, üzerindeki UI ağacında bulunan en yakın `<LevelContext.Provider>` değerini kullanır.
479
+
Bu React'e şunu söyler: "Eğer bu `<Section>` içindeki herhangi bir bileşen `LevelContext` talep ederse, onlara bu `level` değerini ver." Bileşen, UI ağacındaki en yakın `<LevelContext>`'in değerini kullanacaktır.
480
480
481
481
<Sandpack>
482
482
@@ -514,9 +514,9 @@ import { LevelContext } from './LevelContext.js';
514
514
exportdefaultfunctionSection({ level, children }) {
Orijinal kodla aynı sonucu elde edersiniz, ancak her `Heading` bileşenine `level` prop'unu aktarmanız gerekmez! Bunun yerine, üstündeki en yakın `Section` bileşenine sorarak başlık seviyesini "bulur":
568
568
569
-
1.`level` prop'unu `<Section>`'a aktarırsınız.
570
-
2.`Section` alt bileşenlerini `<LevelContext.Provider value={level}>`sarmalar.
571
-
3.`Heading`, `useContext(LevelContext)` ile birlikte yukarıdaki en yakın `LevelContext`'e değerini sorar.
0 commit comments