From 45a3332a382b3a63b44459656479ac5383d9742f Mon Sep 17 00:00:00 2001 From: Jinwoo Oh Date: Sun, 15 Mar 2015 02:15:04 +0900 Subject: [PATCH] Translate tip-18 to Korean - Up to 6f44f60 --- docs/docs/ref-03-component-specs.ko-KR.md | 1 + ...18-use-react-with-other-libraries.ko-KR.md | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docs/tips/18-use-react-with-other-libraries.ko-KR.md diff --git a/docs/docs/ref-03-component-specs.ko-KR.md b/docs/docs/ref-03-component-specs.ko-KR.md index 7dcdb380c2..ce6d1950a9 100644 --- a/docs/docs/ref-03-component-specs.ko-KR.md +++ b/docs/docs/ref-03-component-specs.ko-KR.md @@ -98,6 +98,7 @@ string displayName `displayName` 문자열은 디버그 메시지에 사용됩니다. JSX는 이 값을 자동으로 설정합니다. [JSX 깊이 알기](/react/docs/jsx-in-depth-ko-KR.html#the-transform)를 참고하세요. + ## 생명주기 메소드 컴포넌트의 생명주기에서 특정 시점마다 실행되는 메소드들입니다. diff --git a/docs/tips/18-use-react-with-other-libraries.ko-KR.md b/docs/tips/18-use-react-with-other-libraries.ko-KR.md new file mode 100644 index 0000000000..c4aeab420e --- /dev/null +++ b/docs/tips/18-use-react-with-other-libraries.ko-KR.md @@ -0,0 +1,39 @@ +--- +id: use-react-with-other-libraries-ko-KR +title: React와 다른 라이브러리를 함께 사용하기 +layout: tips +permalink: use-react-with-other-libraries-ko-KR.html +prev: children-undefined-ko-KR.html +next: dangerously-set-inner-html-ko-KR.html +--- + +React만으로 만들 필요는 없습니다. 컴포넌트의 [생명주기 이벤트](/react/docs/component-specs-ko-KR.html#lifecycle-methods), 특히 `componentDidMount`와 `componentDidUpdate`는 다른 라이브러리들의 로직을 넣기에 좋은 장소입니다. + +```js +var App = React.createClass({ + getInitialState: function() { + return {myModel: new myBackboneModel({items: [1, 2, 3]})}; + }, + + componentDidMount: function() { + $(this.refs.placeholder.getDOMNode()).append($('')); + }, + + componentWillUnmount: function() { + // 정리는 여기서 합니다 + }, + + shouldComponentUpdate: function() { + // 이 컴포넌트를 다시는 업데이트하지 않도록 하죠. + return false; + }, + + render: function() { + return
; + } +}); + +React.render(, mountNode); +``` + +이 방식으로 별도의 [이벤트 리스너](/react/tips/dom-event-listeners-ko-KR.html)나 [이벤트 스트림](https://baconjs.github.io) 같은 것들을 더할 수 있습니다.