diff --git a/.github/workflows/discord_notify.yml b/.github/workflows/discord_notify.yml index ff2caa1bf..23974665e 100644 --- a/.github/workflows/discord_notify.yml +++ b/.github/workflows/discord_notify.yml @@ -2,7 +2,7 @@ name: Discord Notify on: pull_request_target: - types: [ labeled ] + types: [opened, ready_for_review] jobs: notify: diff --git a/src/content/blog/index.md b/src/content/blog/index.md index ae3c26034..d1c022fa7 100644 --- a/src/content/blog/index.md +++ b/src/content/blog/index.md @@ -7,7 +7,7 @@ title: React Blog 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. -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. +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. diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 86f089a24..0b73235c1 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -468,15 +468,15 @@ import { LevelContext } from './LevelContext.js'; export default function Section({ level, children }) { return (
- + {children} - +
); } ``` -Bu React'a şunu söyler: "`
` 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 `` değerini kullanır. +Bu React'e şunu söyler: "Eğer bu `
` içindeki herhangi bir bileşen `LevelContext` talep ederse, onlara bu `level` değerini ver." Bileşen, UI ağacındaki en yakın ``'in değerini kullanacaktır. @@ -514,9 +514,9 @@ import { LevelContext } from './LevelContext.js'; export default function Section({ level, children }) { return (
- + {children} - +
); } @@ -566,9 +566,9 @@ export const LevelContext = createContext(1); 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": -1. `level` prop'unu `
`'a aktarırsınız. -2. `Section` alt bileşenlerini `` sarmalar. -3. `Heading`, `useContext(LevelContext)` ile birlikte yukarıdaki en yakın `LevelContext`'e değerini sorar. +1. `
`'a bir `level` prop'u geçirirsiniz. +2. `Section`, çocuklarını `` içine sarar. +3. `Heading`, `useContext(LevelContext)` ile yukarıdaki en yakın `LevelContext` değerini talep eder. ## Context değerini provider'ının tanımlandığı bileşende okuma {/*using-and-providing-context-from-the-same-component*/} @@ -595,9 +595,9 @@ export default function Section({ children }) { const level = useContext(LevelContext); return (
- + {children} - +
); } @@ -643,9 +643,9 @@ export default function Section({ children }) { const level = useContext(LevelContext); return (
- + {children} - +
); } @@ -777,9 +777,9 @@ export default function Section({ children, isFancy }) { 'section ' + (isFancy ? 'fancy' : '') }> - + {children} - +
); } @@ -869,9 +869,9 @@ Genellikle, bazı bilgilere ağacın farklı bölümlerindeki bileşenler taraf * Context, bir elemanın altındaki tüm ağaca bilgi aktarmasını sağlar. -* Context'i aktarmak için: +* Context geçirme: 1. `export const MyContext = createContext(defaultValue)` ile oluşturun ve dışa aktarın. - 2. Farklı derinlikteki herhangi bir alt bileşenden okumak için `useContext(MyContext)` Hook'una aktarın. + 2. Herhangi bir alt bileşende okumak için `useContext(MyContext)` Hook'unu geçirin. 3. Üst bileşenden değer sağlamak için, alt bileşenleri `` içine sarın. * Context ortada bulunan herhangi bir elamandan aktarılır. * Context, "çevresine adapte olan" bileşenler yazmanıza olanak sağlar. @@ -1040,7 +1040,7 @@ export default function App() { const [isLarge, setIsLarge] = useState(false); const imageSize = isLarge ? 150 : 100; return ( -
-
+ ) }