Skip to content

Commit 5a01c0f

Browse files
SYNC merge conflicts
1 parent ddfdd4e commit 5a01c0f

File tree

2 files changed

+6
-35
lines changed

2 files changed

+6
-35
lines changed

.github/workflows/discord_notify.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ name: Discord Notify
22

33
on:
44
pull_request_target:
5-
<<<<<<< HEAD
6-
types: [ labeled ]
7-
=======
85
types: [opened, ready_for_review]
9-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
106

117
jobs:
128
notify:

src/content/learn/passing-data-deeply-with-context.md

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,7 @@ export default function Section({ level, children }) {
476476
}
477477
```
478478

479-
<<<<<<< HEAD
480-
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.
481-
=======
482-
This tells React: "if any component inside this `<Section>` asks for `LevelContext`, give them this `level`." The component will use the value of the nearest `<LevelContext>` in the UI tree above it.
483-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
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.
484480

485481
<Sandpack>
486482

@@ -570,15 +566,9 @@ export const LevelContext = createContext(1);
570566

571567
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":
572568

573-
<<<<<<< HEAD
574-
1. `level` prop'unu `<Section>`'a aktarırsınız.
575-
2. `Section` alt bileşenlerini `<LevelContext.Provider value={level}>` sarmalar.
576-
3. `Heading`, `useContext(LevelContext)` ile birlikte yukarıdaki en yakın `LevelContext`'e değerini sorar.
577-
=======
578-
1. You pass a `level` prop to the `<Section>`.
579-
2. `Section` wraps its children into `<LevelContext value={level}>`.
580-
3. `Heading` asks the closest value of `LevelContext` above with `useContext(LevelContext)`.
581-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
569+
1. `<Section>`'a bir `level` prop'u geçirirsiniz.
570+
2. `Section`, çocuklarını `<LevelContext value={level}>` içine sarar.
571+
3. `Heading`, `useContext(LevelContext)` ile yukarıdaki en yakın `LevelContext` değerini talep eder.
582572

583573
## Context değerini provider'ının tanımlandığı bileşende okuma {/*using-and-providing-context-from-the-same-component*/}
584574

@@ -878,25 +868,14 @@ Genellikle, bazı bilgilere ağacın farklı bölümlerindeki bileşenler taraf
878868
879869
<Recap>
880870
881-
<<<<<<< HEAD
882871
* Context, bir elemanın altındaki tüm ağaca bilgi aktarmasını sağlar.
883-
* Context'i aktarmak için:
872+
* Context geçirme:
884873
1. `export const MyContext = createContext(defaultValue)` ile oluşturun ve dışa aktarın.
885-
2. Farklı derinlikteki herhangi bir alt bileşenden okumak için `useContext(MyContext)` Hook'una aktarın.
874+
2. Herhangi bir alt bileşende okumak için `useContext(MyContext)` Hook'unu geçirin.
886875
3. Üst bileşenden değer sağlamak için, alt bileşenleri `<MyContext.Provider value={...}>` içine sarın.
887876
* Context ortada bulunan herhangi bir elamandan aktarılır.
888877
* Context, "çevresine adapte olan" bileşenler yazmanıza olanak sağlar.
889878
* Context kullanmadan önce, prop olarak aktarmayı veya JSX'i `children` olarak iletmeyi deneyin.
890-
=======
891-
* Context lets a component provide some information to the entire tree below it.
892-
* To pass context:
893-
1. Create and export it with `export const MyContext = createContext(defaultValue)`.
894-
2. Pass it to the `useContext(MyContext)` Hook to read it in any child component, no matter how deep.
895-
3. Wrap children into `<MyContext value={...}>` to provide it from a parent.
896-
* Context passes through any components in the middle.
897-
* Context lets you write components that "adapt to their surroundings".
898-
* Before you use context, try passing props or passing JSX as `children`.
899-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
900879
901880
</Recap>
902881
@@ -1047,11 +1026,7 @@ li {
10471026
10481027
`imageSize` prop'unu bütün bileşenlerden kaldırın.
10491028
1050-
<<<<<<< HEAD
10511029
`Context.js` dosyasında `ImageSizeContext`'i oluşturun ve dışa aktarın. Ardından değeri aşağı aktarmak için `List`'i `<ImageSizeContext.Provider value={imageSize}>` ile sarın ve `useContext(ImageSizeContext)` kullanarak `PlaceImage` bileşeninde değerini okuyun:
1052-
=======
1053-
Create and export `ImageSizeContext` from `Context.js`. Then wrap the List into `<ImageSizeContext value={imageSize}>` to pass the value down, and `useContext(ImageSizeContext)` to read it in the `PlaceImage`:
1054-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
10551030
10561031
<Sandpack>
10571032

0 commit comments

Comments
 (0)