From e757720a72408f118d2d3d047f4fcb2444ce09a1 Mon Sep 17 00:00:00 2001 From: ohsung0722 <99doldol@naver.com> Date: Tue, 29 Apr 2025 15:49:18 +0900 Subject: [PATCH 1/5] docs(i18n-ko): translate diagram title for context providing data to the tree --- src/content/learn/passing-data-deeply-with-context.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 38b0520de..fb2891a05 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -214,13 +214,13 @@ Context는 부모가 트리 내부 전체에, 심지어 멀리 떨어진 컴포 -Using context in close children +Context를 가까운 자식 컴포넌트에서 사용하기 -Using context in distant children +Context를 먼 자식 컴포넌트에서 사용하기 From 3d58b70fb4d67e39a4aaaa1ebd46b7ea914c422e Mon Sep 17 00:00:00 2001 From: ohsung0722 <99doldol@naver.com> Date: Tue, 29 Apr 2025 15:52:44 +0900 Subject: [PATCH 2/5] docs(i18n-ko): Remove leftover English sentences --- src/content/learn/passing-data-deeply-with-context.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index fb2891a05..2a0c5966e 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -478,8 +478,6 @@ export default function Section({ level, children }) { 이것은 React에게 `Section` 내의 어떤 컴포넌트가 `LevelContext`를 요구하면 `level`을 주라고 알려줍니다. 컴포넌트는 그 위에 있는 UI 트리에서 가장 가까운 ``의 값을 사용합니다. -This tells React: "if any component inside this `
` asks for `LevelContext`, give them this `level`." The component will use the value of the nearest `` in the UI tree above it. - ```js From fa658c21836d1d436b4f89fcec21f96693692ad3 Mon Sep 17 00:00:00 2001 From: ohsung0722 <99doldol@naver.com> Date: Tue, 29 Apr 2025 15:54:10 +0900 Subject: [PATCH 3/5] docs(i18n-ko): Remove leftover English sentences --- src/content/learn/passing-data-deeply-with-context.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 2a0c5966e..5b51f3226 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -570,10 +570,6 @@ export const LevelContext = createContext(1); 2. `Section`은 자식을 ``로 감싸줍니다. 3. `Heading`은 `useContext(LevelContext)`를 사용해 가장 근처의 `LevelContext`의 값을 요청합니다. -1. You pass a `level` prop to the `
`. -2. `Section` wraps its children into ``. -3. `Heading` asks the closest value of `LevelContext` above with `useContext(LevelContext)`. - ## 같은 컴포넌트에서 context를 사용하며 제공하기 {/*using-and-providing-context-from-the-same-component*/} 지금은 각각의 섹션에 `level`을 수동으로 지정해야 합니다. From 65d6212d052ee11219fd34afab9c7518fac2c918 Mon Sep 17 00:00:00 2001 From: ohsung0722 <99doldol@naver.com> Date: Tue, 29 Apr 2025 15:55:39 +0900 Subject: [PATCH 4/5] docs(i18n-ko): Remove leftover English sentences --- src/content/learn/passing-data-deeply-with-context.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 5b51f3226..9becc90fa 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -873,15 +873,6 @@ Context는 정적인 값으로 제한되지 않습니다. 다음 렌더링 시 - Context를 활용해 "주변에 적응하는" 컴포넌트를 작성할 수 있습니다. - Context를 사용하기 전에 props를 전달하거나 JSX를 `children`으로 전달하는 것을 먼저 시도해보세요. -* Context lets a component provide some information to the entire tree below it. -* To pass context: - 1. Create and export it with `export const MyContext = createContext(defaultValue)`. - 2. Pass it to the `useContext(MyContext)` Hook to read it in any child component, no matter how deep. - 3. Wrap children into `` to provide it from a parent. -* Context passes through any components in the middle. -* Context lets you write components that "adapt to their surroundings". -* Before you use context, try passing props or passing JSX as `children`. - From e8ea6ab3158eeb002f916f902f7547dff8066840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sun, 4 May 2025 19:56:49 +0900 Subject: [PATCH 5/5] Update passing-data-deeply-with-context.md --- src/content/learn/passing-data-deeply-with-context.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 9becc90fa..3d26d54ca 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -476,7 +476,7 @@ export default function Section({ level, children }) { } ``` -이것은 React에게 `Section` 내의 어떤 컴포넌트가 `LevelContext`를 요구하면 `level`을 주라고 알려줍니다. 컴포넌트는 그 위에 있는 UI 트리에서 가장 가까운 ``의 값을 사용합니다. +이것은 React에게 `
` 내의 어떤 컴포넌트가 `LevelContext`를 요구하면 `level`을 주라고 알려줍니다. 컴포넌트는 그 위에 있는 UI 트리에서 가장 가까운 ``의 값을 사용합니다. @@ -567,7 +567,7 @@ export const LevelContext = createContext(1); 기존 코드와 동일한 결과이지만 `level` prop을 각 `Heading` 컴포넌트에 전달할 필요는 없습니다! 대신 위의 가장 가까운 `Section`에게 제목 레벨을 "확인"합니다. 1. `level` prop 을 `
`에 전달합니다. -2. `Section`은 자식을 ``로 감싸줍니다. +2. `Section`은 자식을 ``로 감싸줍니다. 3. `Heading`은 `useContext(LevelContext)`를 사용해 가장 근처의 `LevelContext`의 값을 요청합니다. ## 같은 컴포넌트에서 context를 사용하며 제공하기 {/*using-and-providing-context-from-the-same-component*/} @@ -868,7 +868,7 @@ Context는 정적인 값으로 제한되지 않습니다. 다음 렌더링 시 - Context를 전달하려면 다음과 같습니다 1. `export const MyContext = createContext(defaultValue)`로 context를 생성하고 내보내세요. 2. `useContext(MyContext)` Hook에 전달해 얼마나 깊이 있든 자식 컴포넌트가 읽을 수 있도록 합니다. - 3. 자식을 ``로 감싸 부모로부터 context를 받도록 합니다. + 3. 자식을 ``로 감싸 부모로부터 context를 받도록 합니다. - Context는 중간의 어떤 컴포넌트도 지나갈 수 있습니다. - Context를 활용해 "주변에 적응하는" 컴포넌트를 작성할 수 있습니다. - Context를 사용하기 전에 props를 전달하거나 JSX를 `children`으로 전달하는 것을 먼저 시도해보세요.