Skip to content

Commit 4a30af5

Browse files
committed
Translate unknown-prop
1 parent 5e550d4 commit 4a30af5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Diff for: content/warnings/unknown-prop.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,37 @@ title: Unknown Prop Warning
33
layout: single
44
permalink: warnings/unknown-prop.html
55
---
6-
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as a legal DOM attribute/property. You should ensure that your DOM elements do not have spurious props floating around.
6+
올바른 DOM 어트리뷰트/프로퍼티로 인식되지 않는 DOM 엘리먼트를 렌더링하려고 하면 unknown-prop 경고가 발생합니다. DOM 엘리먼트에 잘못된 props가 추가되지 않도록 해야 합니다.
77

8-
There are a couple of likely reasons this warning could be appearing:
8+
이 경고가 표시되는 몇 가지 이유가 있습니다.
99

10-
1. Are you using `{...this.props}` or `cloneElement(element, this.props)`? Your component is transferring its own props directly to a child element (eg. [transferring props](/docs/transferring-props.html)). When transferring props to a child component, you should ensure that you are not accidentally forwarding props that were intended to be interpreted by the parent component.
10+
1. `{...this.props}` 또는 `cloneElement(element, this.props)`를 사용하고 있습니까? 그렇다면 컴포넌트가 자기 자신의 props를 자식 엘리먼트로 직접 전달하는 경우입니다. (예시. [props 전달](/docs/transferring-props.html)) 자식 컴포넌트로 props를 전달할 때 부모 컴포넌트에서 사용되는 props를 실수로 전달하지 않도록 해야 합니다.
1111

12-
2. You are using a non-standard DOM attribute on a native DOM node, perhaps to represent custom data. If you are trying to attach custom data to a standard DOM element, consider using a custom data attribute as described [on MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes).
12+
2. 사용자 정의 데이터를 나타내기 위해 네이티브 DOM 노드에서 비표준 DOM 어트리뷰트를 사용하고 있는 경우입니다. 표준 DOM 엘리먼트에 사용자 정의 데이터를 추가하려는 경우 [MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes)에 설명된 사용자 정의 data 어트리뷰트를 사용해보세요.
1313

14-
3. React does not yet recognize the attribute you specified. This will likely be fixed in a future version of React. However, React currently strips all unknown attributes, so specifying them in your React app will not cause them to be rendered.
14+
3. React가 아직 지정된 어트리뷰트를 인식하지 못하는 경우입니다. 이것은 다음 React 버전에서 수정될 수 있습니다. 그러나 React는 현재 알 수 없는 모든 어트리뷰트를 제거하므로 React 앱에서 렌더링되지 않습니다.
1515

16-
4. You are using a React component without an upper case. React interprets it as a DOM tag because [React JSX transform uses the upper vs. lower case convention to distinguish between user-defined components and DOM tags](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
16+
4. React 컴포넌트 이름에 대문자가 포함되어 있지 않은 경우입니다. [React JSX에서는 대소문자 규칙을 사용하여 사용자 정의 컴포넌트와 DOM 태그를 구별](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized)하기 때문에 React 컴포넌트에 대문자가 없다면 이것을 DOM 태그로 해석합니다.
1717

1818
---
1919

20-
To fix this, composite components should "consume" any prop that is intended for the composite component and not intended for the child component. Example:
20+
이 문제를 해결하려면, 합성 컴포넌트는 자식 컴포넌트를 위해 만들어진 것이 아닌 합성 컴포넌트를 위해 만들어진 모든 props를 "소비해야 합니다". 예를 들어,
2121

22-
**Bad:** Unexpected `layout` prop is forwarded to the `div` tag.
22+
**금지** 예기치 않은 `layout` prop이 `div` 태그에 전달됩니다.
2323

2424
```js
2525
function MyDiv(props) {
2626
if (props.layout === 'horizontal') {
27-
// BAD! Because you know for sure "layout" is not a prop that <div> understands.
27+
// 금지! "layout"은 <div> 가 이해하는 prop이 아니기 때문입니다.
2828
return <div {...props} style={getHorizontalStyle()} />
2929
} else {
30-
// BAD! Because you know for sure "layout" is not a prop that <div> understands.
30+
// 금지! "layout"은 <div> 가 이해하는 prop이 아니기 때문입니다.
3131
return <div {...props} style={getVerticalStyle()} />
3232
}
3333
}
3434
```
3535

36-
**Good:** The spread operator can be used to pull variables off props, and put the remaining props into a variable.
36+
**권장** 전개 연산자(spread operator)를 사용하여 변수를 props에서 빼내고 나머지 props를 변수에 넣을 수 있습니다.
3737

3838
```js
3939
function MyDiv(props) {
@@ -46,7 +46,7 @@ function MyDiv(props) {
4646
}
4747
```
4848

49-
**Good:** You can also assign the props to a new object and delete the keys that you're using from the new object. Be sure not to delete the props from the original `this.props` object, since that object should be considered immutable.
49+
**권장** 새 객체에 props를 복사하고 새 객체에서 사용 중인 key를 삭제할 수도 있습니다. 원래 `this.props` 객체에서 그 객체를 삭제하면 안됩니다. 왜냐하면 그 객체는 불변이어야 하기 때문입니다.
5050

5151
```js
5252
function MyDiv(props) {

0 commit comments

Comments
 (0)