diff --git a/docs/docs/ref-03-component-specs.ko-KR.md b/docs/docs/ref-03-component-specs.ko-KR.md new file mode 100644 index 0000000000..f8697c0c29 --- /dev/null +++ b/docs/docs/ref-03-component-specs.ko-KR.md @@ -0,0 +1,215 @@ +--- +id: component-specs-ko-KR +title: 컴포넌트 명세와 생명주기 +permalink: component-specs.ko-KR.html +prev: component-api.ko-KR.html +next: tags-and-attributes.ko-KR.html +--- + +## 컴포넌트 명세 + +`React.createClass()`를 호출하여 컴포넌트 클래스를 생성할 때, `render` 메소드를 포함한 명세 객체를 제공해야 합니다. 또한 필요한 경우 여기에서 설명하는 다른 생명주기 메소드를 명세 객체에 추가로 제공할 수 있습니다. + + +### render + +```javascript +ReactComponent render() +``` + +`render()` 메소드는 필수 항목입니다. + +호출되면 `this.props`와 `this.state`를 토대로 하나의 자식 컴포넌트를 리턴합니다. 이 자식 컴포넌트는 네이티브 DOM 컴포넌트의 가상 표현 (`
`나 `React.DOM.div()` 등) 또는 직접 정의한 조합(composite) 컴포넌트가 될 수 있습니다. + +아무 것도 렌더링되지 않도록 하려면 `null`이나 `false`를 리턴합니다. React는 지금의 차이 비교 알고리즘이 작동할 수 있도록 내부적으로는 `