From c70b4e5ea51bfd12d4a238c66ad83ac2285838a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=95=9C?= <248852059+coalfire-create@users.noreply.github.com> Date: Sat, 5 Dec 2026 20:47:23 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=97=98?= =?UTF-8?q?=EB=A6=AC=EB=A8=BC=ED=8A=B8=20=EC=84=B9=EC=85=98=EA=B3=BC=20inp?= =?UTF-8?q?ut=20formAction=20=EC=84=A4=EB=AA=85=20=EB=B2=88=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - components/index.md: 커스텀 HTML 엘리먼트, 값 설정, 이벤트 수신 섹션의 미번역 제목 2개와 문단 8개 번역 - input.md: 원문에 새로 추가된 formAction 설명과 제어 입력 안내 문장 번역 Co-Authored-By: Claude Opus 5.5 --- .../reference/react-dom/components/index.md | 22 +++++++++---------- .../reference/react-dom/components/input.md | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/content/reference/react-dom/components/index.md b/src/content/reference/react-dom/components/index.md index d6a6d387a..fcda0acbe 100644 --- a/src/content/reference/react-dom/components/index.md +++ b/src/content/reference/react-dom/components/index.md @@ -164,31 +164,31 @@ React는 브라우저에 내장된 모든 HTML 컴포넌트를 지원합니다. ### 커스텀 HTML 요소 {/*custom-html-elements*/} -If you render a tag with a dash, like ``, React will assume you want to render a [custom HTML element.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) +``처럼 대시(`-`)가 포함된 태그를 렌더링하면, React는 [커스텀 HTML 엘리먼트](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)를 렌더링하려는 것으로 간주합니다. [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) 어트리뷰트를 사용하여 브라우저 내장 HTML 요소를 렌더링하면 커스텀 엘리먼트로 취급됩니다. -#### Setting values on custom elements {/*attributes-vs-properties*/} +#### 커스텀 엘리먼트에 값 설정하기 {/*attributes-vs-properties*/} -Custom elements have two methods of passing data into them: +커스텀 엘리먼트에 데이터를 전달하는 방법은 두 가지입니다. -1) Attributes: Which are displayed in markup and can only be set to string values -2) Properties: Which are not displayed in markup and can be set to arbitrary JavaScript values +1) 어트리뷰트: 마크업에 표시되며 문자열 값만 설정할 수 있습니다. +2) 프로퍼티: 마크업에 표시되지 않으며 임의의 JavaScript 값을 설정할 수 있습니다. -By default, React will pass values bound in JSX as attributes: +기본적으로 React는 JSX에 바인딩된 값을 어트리뷰트로 전달합니다. ```jsx ``` -Non-string JavaScript values passed to custom elements will be serialized by default: +커스텀 엘리먼트에 전달된 문자열이 아닌 JavaScript 값은 기본적으로 직렬화됩니다. ```jsx // Will be passed as `"1,2,3"` as the output of `[1,2,3].toString()` ``` -React will, however, recognize a custom element's property as one that it may pass arbitrary values to if the property name shows up on the class during construction: +하지만 생성 시점에 클래스에 해당 프로퍼티 이름이 존재하면, React는 그 프로퍼티를 임의의 값을 전달할 수 있는 커스텀 엘리먼트의 프로퍼티로 인식합니다. @@ -226,9 +226,9 @@ export function App() { -#### Listening for events on custom elements {/*custom-element-events*/} +#### 커스텀 엘리먼트의 이벤트 수신하기 {/*custom-element-events*/} -A common pattern when using custom elements is that they may dispatch [`CustomEvent`s](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) rather than accept a function to call when an event occur. You can listen for these events using an `on` prefix when binding to the event via JSX. +커스텀 엘리먼트는 이벤트가 발생했을 때 호출할 함수를 받는 대신 [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)를 발생시키는 경우가 많습니다. JSX에서 이벤트를 바인딩할 때 `on` 접두사를 붙여 이러한 이벤트를 수신할 수 있습니다. @@ -287,7 +287,7 @@ export function App() { -Events are case-sensitive and support dashes (`-`). Preserve the casing of the event and include all dashes when listening for custom element's events: +이벤트 이름은 대소문자를 구분하며 대시(`-`)를 포함할 수 있습니다. 커스텀 엘리먼트의 이벤트를 수신할 때는 이벤트 이름의 대소문자를 그대로 유지하고 대시도 모두 포함하세요. ```jsx // Listens for `say-hi` events diff --git a/src/content/reference/react-dom/components/input.md b/src/content/reference/react-dom/components/input.md index e7b5ea182..a762660cc 100644 --- a/src/content/reference/react-dom/components/input.md +++ b/src/content/reference/react-dom/components/input.md @@ -32,9 +32,9 @@ title: "" ``은 모든 [공통 엘리먼트 Props](/reference/react-dom/components/common#common-props)를 지원합니다. -- [`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): A string or function. Overrides the parent `
` for `type="submit"` and `type="image"`. When a URL is passed to `action` the form will behave like a standard HTML form. When a function is passed to `formAction` the function will handle the form submission. See [``](/reference/react-dom/components/form#props). +- [`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): 문자열 또는 함수 타입. `type="submit"`과 `type="image"`의 부모 ``을 덮어씁니다. URL을 `action`에 전달하면 폼은 표준 HTML 폼처럼 동작합니다. 함수를 `formAction`에 전달하면 해당 함수가 폼 제출을 처리합니다. [``](/reference/react-dom/components/form#props)을 참고하세요. -You can [make an input controlled](#controlling-an-input-with-a-state-variable) by passing one of these props: +다음 Props 중 하나를 전달하면 [입력을 제어](#controlling-an-input-with-a-state-variable)할 수 있습니다. * [`checked`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#checked): 불리언 타입. 체크박스 입력 또는 라디오 버튼에서 선택 여부를 제어합니다. * [`value`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#value): 문자열 타입. 텍스트 입력의 경우 텍스트를 제어합니다. (라디오 버튼의 경우 폼 데이터를 지정합니다.)