From 523cee0c7cacc12dd6e2c9b5c921cc669757806a Mon Sep 17 00:00:00 2001 From: devjaeyoon Date: Wed, 3 Sep 2025 16:15:54 +0900 Subject: [PATCH 1/2] docs: translate content/reference/react/useRef.md --- src/content/reference/react/useRef.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/reference/react/useRef.md b/src/content/reference/react/useRef.md index 3b468abc1..ca00824a0 100644 --- a/src/content/reference/react/useRef.md +++ b/src/content/reference/react/useRef.md @@ -448,9 +448,7 @@ button { display: block; margin-bottom: 20px; } #### 컴포넌트에 ref 노출하기 {/*exposing-a-ref-to-your-own-component*/} -때로는 부모 컴포넌트가 컴포넌트 내부의 DOM을 조작할 수 있도록 하고 싶을 때가 있습니다. 예를 들어 `MyInput` 컴포넌트를 작성하는 중인데, 부모 컴포넌트가 (부모가 접근할 수 없는) `MyInput`의 input에 포커스를 맞출 수 있게 하고 싶을 수 있습니다. `useRef`로 input을 붙잡고 [`forwardRef`](/reference/react/forwardRef)로 이를 부모 컴포넌트에 노출시킬 수 있습니다. [자세한 내용은 여기에서 확인하세요.](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes) - -Sometimes, you may want to let the parent component manipulate the DOM inside of your component. For example, maybe you're writing a `MyInput` component, but you want the parent to be able to focus the input (which the parent has no access to). You can create a `ref` in the parent and pass the `ref` as prop to the child component. Read a [detailed walkthrough](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes) here. {/*TODO*/} +때로는 부모 컴포넌트가 컴포넌트 내부의 DOM을 조작할 수 있도록 하고 싶을 때가 있습니다. 예를 들어 `MyInput` 컴포넌트를 작성하는 중인데, 부모 컴포넌트가 (부모가 접근할 수 없는) `MyInput`의 input에 포커스를 맞출 수 있게 하고 싶을 수 있습니다. 이때 부모는 ref를 만들고, 이 ref를 자식 컴포넌트로 넘겨줌으로써 부모가 접근할 수 있도록 만들 수 있습니다. [자세한 내용은 여기에서 확인하세요.](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes) From a232967ec5abef91a603a12ec25d5f47aa17a3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Thu, 4 Sep 2025 14:58:37 +0900 Subject: [PATCH 2/2] Fix Korean translation for exposing refs in components --- src/content/reference/react/useRef.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/useRef.md b/src/content/reference/react/useRef.md index ca00824a0..bcc19c259 100644 --- a/src/content/reference/react/useRef.md +++ b/src/content/reference/react/useRef.md @@ -448,7 +448,7 @@ button { display: block; margin-bottom: 20px; } #### 컴포넌트에 ref 노출하기 {/*exposing-a-ref-to-your-own-component*/} -때로는 부모 컴포넌트가 컴포넌트 내부의 DOM을 조작할 수 있도록 하고 싶을 때가 있습니다. 예를 들어 `MyInput` 컴포넌트를 작성하는 중인데, 부모 컴포넌트가 (부모가 접근할 수 없는) `MyInput`의 input에 포커스를 맞출 수 있게 하고 싶을 수 있습니다. 이때 부모는 ref를 만들고, 이 ref를 자식 컴포넌트로 넘겨줌으로써 부모가 접근할 수 있도록 만들 수 있습니다. [자세한 내용은 여기에서 확인하세요.](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes) +때로는 부모 컴포넌트가 컴포넌트 내부의 DOM을 조작할 수 있도록 하고 싶을 때가 있습니다. 예를 들어 `MyInput` 컴포넌트를 작성하는 중인데, 부모 컴포넌트가 (부모가 접근할 수 없는) `MyInput`의 Input에 포커스를 맞출 수 있게 하고 싶을 수 있습니다. 이때 부모는 `ref`를 만들고, 이 `ref`를 자식 컴포넌트로 넘겨줌으로써 부모가 접근할 수 있도록 만들 수 있습니다. [자세한 내용은 여기에서 확인하세요.](/learn/manipulating-the-dom-with-refs#accessing-another-components-dom-nodes)