{"action":"created","comment":{"url":"https://api.github.com/repos/reactkr/react/pulls/comments/26041578","id":26041578,"diff_hunk":"@@ -0,0 +1,164 @@\n+---\n+id: transferring-props-ko-KR\n+title: Props 전달\n+permalink: transferring-props-ko-KR.html\n+prev: reusable-components-ko-KR.html\n+next: forms-ko-KR.html\n+---\n+\n+React에서는 추상화에서 컴포넌트를 감싸는 것이 일반적인 패턴입니다. 바깥 컴포넌트는 복잡한 세부 구현을 다루기 위한 간단한 프로퍼티를 노출합니다.\n+\n+[JSX 스프레드 어트리뷰트](/react/docs/jsx-spread-ko-KR.html)를 통해 props에 추가적인 값을 병합할 수 있습니다.\n+\n+```javascript\n+return <Component {...this.props} more=\"values\" />;\n+```\n+\n+만약 JSX를 사용하지 않는다면 ES6의 `Object.assign`나 Underscore의 `_.extend` 같은 객체 헬퍼를 사용할 수 있습니다:\n+\n+```javascript\n+return Component(Object.assign({}, this.props, { more: 'values' }));\n+```\n+\n+이 튜토리얼의 나머지 부분은 모범 답안을 소개할 것입니다. JSX와 실험적인 ES7 구문을 사용합니다.\n+\n+## 수동적인 전달\n+\n+대부분의 경우 명시적으로 프로퍼티를 아래로 전달해야 합니다. 이는 내부 API 중 사용될 일부만을 드러냈음을 보장합니다.\n+\n+```javascript\n+var FancyCheckbox = React.createClass({\n+  render: function() {\n+    var fancyClass = this.props.checked ? 'FancyChecked' : 'FancyUnchecked';\n+    return (\n+      <div className={fancyClass} onClick={this.props.onClick}>\n+        {this.props.children}\n+      </div>\n+    );\n+  }\n+});\n+React.render(\n+  <FancyCheckbox checked={true} onClick={console.log.bind(console)}>\n+    세상아 안녕!\n+  </FancyCheckbox>,\n+  document.body\n+);\n+```\n+\n+하지만 `name`이나 `title`, `onMouseOver` 같은 prop들이 더 추가된다면 어떨까요?\n+\n+## JSX에서 `...`를 사용해 전달하기\n+\n+> 주의:\n+> \n+> 아래의 예제에서는 실험적인 ES7 문법이 사용되었기 때문에 `--harmony ` 플래그가 필요합니다. 브라우저에서 JSX transformer를 사용 중이라면, `<script type=\"text/jsx;harmony=true\">`를 사용해 스크립트를 작성하세요. 자세히 알아보려면 아래의 [잔여 프로퍼티와 스프레드 프로퍼티 ...](http://facebook.github.io/react/docs/transferring-props-ko-KR.html#rest-and-spread-properties-...)를 확인하세요.","path":"docs/docs/06-transferring-props.ko-KR.md","position":54,"original_position":54,"commit_id":"b342224dac1d2e9ba07f31d76c5f18fc5e9c680f","original_commit_id":"b342224dac1d2e9ba07f31d76c5f18fc5e9c680f","user":{"login":"arkist","id":1099068,"avatar_url":"https://avatars.githubusercontent.com/u/1099068?v=3","gravatar_id":"","url":"https://api.github.com/users/arkist","html_url":"https://github.com/arkist","followers_url":"https://api.github.com/users/arkist/followers","following_url":"https://api.github.com/users/arkist/following{/other_user}","gists_url":"https://api.github.com/users/arkist/gists{/gist_id}","starred_url":"https://api.github.com/users/arkist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkist/subscriptions","organizations_url":"https://api.github.com/users/arkist/orgs","repos_url":"https://api.github.com/users/arkist/repos","events_url":"https://api.github.com/users/arkist/events{/privacy}","received_events_url":"https://api.github.com/users/arkist/received_events","type":"User","site_admin":false},"body":"넵, 09에 맞춰 '변환기'로 가겠습니다","created_at":"2015-03-09T14:54:17Z","updated_at":"2015-03-09T14:54:17Z","html_url":"https://github.com/reactkr/react/pull/45#discussion_r26041578","pull_request_url":"https://api.github.com/repos/reactkr/react/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/reactkr/react/pulls/comments/26041578"},"html":{"href":"https://github.com/reactkr/react/pull/45#discussion_r26041578"},"pull_request":{"href":"https://api.github.com/repos/reactkr/react/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/reactkr/react/pulls/45","id":30759626,"html_url":"https://github.com/reactkr/react/pull/45","diff_url":"https://github.com/reactkr/react/pull/45.diff","patch_url":"https://github.com/reactkr/react/pull/45.patch","issue_url":"https://api.github.com/repos/reactkr/react/issues/45","number":45,"state":"open","locked":false,"title":"Translate 06 to Korean","user":{"login":"arkist","id":1099068,"avatar_url":"https://avatars.githubusercontent.com/u/1099068?v=3","gravatar_id":"","url":"https://api.github.com/users/arkist","html_url":"https://github.com/arkist","followers_url":"https://api.github.com/users/arkist/followers","following_url":"https://api.github.com/users/arkist/following{/other_user}","gists_url":"https://api.github.com/users/arkist/gists{/gist_id}","starred_url":"https://api.github.com/users/arkist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkist/subscriptions","organizations_url":"https://api.github.com/users/arkist/orgs","repos_url":"https://api.github.com/users/arkist/repos","events_url":"https://api.github.com/users/arkist/events{/privacy}","received_events_url":"https://api.github.com/users/arkist/received_events","type":"User","site_admin":false},"body":"- Up to 8326a9f","created_at":"2015-03-09T13:24:06Z","updated_at":"2015-03-09T14:54:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f26ee386c7c91a2fd26787659b87e0aba1e5028a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reactkr/react/pulls/45/commits","review_comments_url":"https://api.github.com/repos/reactkr/react/pulls/45/comments","review_comment_url":"https://api.github.com/repos/reactkr/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactkr/react/issues/45/comments","statuses_url":"https://api.github.com/repos/reactkr/react/statuses/b342224dac1d2e9ba07f31d76c5f18fc5e9c680f","head":{"label":"arkist:translation-06","ref":"translation-06","sha":"b342224dac1d2e9ba07f31d76c5f18fc5e9c680f","user":{"login":"arkist","id":1099068,"avatar_url":"https://avatars.githubusercontent.com/u/1099068?v=3","gravatar_id":"","url":"https://api.github.com/users/arkist","html_url":"https://github.com/arkist","followers_url":"https://api.github.com/users/arkist/followers","following_url":"https://api.github.com/users/arkist/following{/other_user}","gists_url":"https://api.github.com/users/arkist/gists{/gist_id}","starred_url":"https://api.github.com/users/arkist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkist/subscriptions","organizations_url":"https://api.github.com/users/arkist/orgs","repos_url":"https://api.github.com/users/arkist/repos","events_url":"https://api.github.com/users/arkist/events{/privacy}","received_events_url":"https://api.github.com/users/arkist/received_events","type":"User","site_admin":false},"repo":{"id":29893949,"name":"react","full_name":"arkist/react","owner":{"login":"arkist","id":1099068,"avatar_url":"https://avatars.githubusercontent.com/u/1099068?v=3","gravatar_id":"","url":"https://api.github.com/users/arkist","html_url":"https://github.com/arkist","followers_url":"https://api.github.com/users/arkist/followers","following_url":"https://api.github.com/users/arkist/following{/other_user}","gists_url":"https://api.github.com/users/arkist/gists{/gist_id}","starred_url":"https://api.github.com/users/arkist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkist/subscriptions","organizations_url":"https://api.github.com/users/arkist/orgs","repos_url":"https://api.github.com/users/arkist/repos","events_url":"https://api.github.com/users/arkist/events{/privacy}","received_events_url":"https://api.github.com/users/arkist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arkist/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/arkist/react","forks_url":"https://api.github.com/repos/arkist/react/forks","keys_url":"https://api.github.com/repos/arkist/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arkist/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arkist/react/teams","hooks_url":"https://api.github.com/repos/arkist/react/hooks","issue_events_url":"https://api.github.com/repos/arkist/react/issues/events{/number}","events_url":"https://api.github.com/repos/arkist/react/events","assignees_url":"https://api.github.com/repos/arkist/react/assignees{/user}","branches_url":"https://api.github.com/repos/arkist/react/branches{/branch}","tags_url":"https://api.github.com/repos/arkist/react/tags","blobs_url":"https://api.github.com/repos/arkist/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arkist/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arkist/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/arkist/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arkist/react/statuses/{sha}","languages_url":"https://api.github.com/repos/arkist/react/languages","stargazers_url":"https://api.github.com/repos/arkist/react/stargazers","contributors_url":"https://api.github.com/repos/arkist/react/contributors","subscribers_url":"https://api.github.com/repos/arkist/react/subscribers","subscription_url":"https://api.github.com/repos/arkist/react/subscription","commits_url":"https://api.github.com/repos/arkist/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/arkist/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/arkist/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/arkist/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/arkist/react/contents/{+path}","compare_url":"https://api.github.com/repos/arkist/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arkist/react/merges","archive_url":"https://api.github.com/repos/arkist/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arkist/react/downloads","issues_url":"https://api.github.com/repos/arkist/react/issues{/number}","pulls_url":"https://api.github.com/repos/arkist/react/pulls{/number}","milestones_url":"https://api.github.com/repos/arkist/react/milestones{/number}","notifications_url":"https://api.github.com/repos/arkist/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arkist/react/labels{/name}","releases_url":"https://api.github.com/repos/arkist/react/releases{/id}","created_at":"2015-01-27T02:45:36Z","updated_at":"2015-03-08T06:12:59Z","pushed_at":"2015-03-09T13:22:31Z","git_url":"git://github.com/arkist/react.git","ssh_url":"git@github.com:arkist/react.git","clone_url":"https://github.com/arkist/react.git","svn_url":"https://github.com/arkist/react","homepage":"http://facebook.github.io/react/","size":44463,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"translation"}},"base":{"label":"reactkr:translation","ref":"translation","sha":"a01167a97859b65b3419db3a271553aa0b6f43b4","user":{"login":"reactkr","id":9114161,"avatar_url":"https://avatars.githubusercontent.com/u/9114161?v=3","gravatar_id":"","url":"https://api.github.com/users/reactkr","html_url":"https://github.com/reactkr","followers_url":"https://api.github.com/users/reactkr/followers","following_url":"https://api.github.com/users/reactkr/following{/other_user}","gists_url":"https://api.github.com/users/reactkr/gists{/gist_id}","starred_url":"https://api.github.com/users/reactkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactkr/subscriptions","organizations_url":"https://api.github.com/users/reactkr/orgs","repos_url":"https://api.github.com/users/reactkr/repos","events_url":"https://api.github.com/users/reactkr/events{/privacy}","received_events_url":"https://api.github.com/users/reactkr/received_events","type":"Organization","site_admin":false},"repo":{"id":29853751,"name":"react","full_name":"reactkr/react","owner":{"login":"reactkr","id":9114161,"avatar_url":"https://avatars.githubusercontent.com/u/9114161?v=3","gravatar_id":"","url":"https://api.github.com/users/reactkr","html_url":"https://github.com/reactkr","followers_url":"https://api.github.com/users/reactkr/followers","following_url":"https://api.github.com/users/reactkr/following{/other_user}","gists_url":"https://api.github.com/users/reactkr/gists{/gist_id}","starred_url":"https://api.github.com/users/reactkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactkr/subscriptions","organizations_url":"https://api.github.com/users/reactkr/orgs","repos_url":"https://api.github.com/users/reactkr/repos","events_url":"https://api.github.com/users/reactkr/events{/privacy}","received_events_url":"https://api.github.com/users/reactkr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactkr/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/reactkr/react","forks_url":"https://api.github.com/repos/reactkr/react/forks","keys_url":"https://api.github.com/repos/reactkr/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactkr/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactkr/react/teams","hooks_url":"https://api.github.com/repos/reactkr/react/hooks","issue_events_url":"https://api.github.com/repos/reactkr/react/issues/events{/number}","events_url":"https://api.github.com/repos/reactkr/react/events","assignees_url":"https://api.github.com/repos/reactkr/react/assignees{/user}","branches_url":"https://api.github.com/repos/reactkr/react/branches{/branch}","tags_url":"https://api.github.com/repos/reactkr/react/tags","blobs_url":"https://api.github.com/repos/reactkr/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactkr/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactkr/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactkr/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactkr/react/statuses/{sha}","languages_url":"https://api.github.com/repos/reactkr/react/languages","stargazers_url":"https://api.github.com/repos/reactkr/react/stargazers","contributors_url":"https://api.github.com/repos/reactkr/react/contributors","subscribers_url":"https://api.github.com/repos/reactkr/react/subscribers","subscription_url":"https://api.github.com/repos/reactkr/react/subscription","commits_url":"https://api.github.com/repos/reactkr/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactkr/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactkr/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactkr/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactkr/react/contents/{+path}","compare_url":"https://api.github.com/repos/reactkr/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactkr/react/merges","archive_url":"https://api.github.com/repos/reactkr/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactkr/react/downloads","issues_url":"https://api.github.com/repos/reactkr/react/issues{/number}","pulls_url":"https://api.github.com/repos/reactkr/react/pulls{/number}","milestones_url":"https://api.github.com/repos/reactkr/react/milestones{/number}","notifications_url":"https://api.github.com/repos/reactkr/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactkr/react/labels{/name}","releases_url":"https://api.github.com/repos/reactkr/react/releases{/id}","created_at":"2015-01-26T09:19:42Z","updated_at":"2015-03-09T12:24:56Z","pushed_at":"2015-03-09T12:50:00Z","git_url":"git://github.com/reactkr/react.git","ssh_url":"git@github.com:reactkr/react.git","clone_url":"https://github.com/reactkr/react.git","svn_url":"https://github.com/reactkr/react","homepage":"http://facebook.github.io/react/","size":47437,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"translation"}},"_links":{"self":{"href":"https://api.github.com/repos/reactkr/react/pulls/45"},"html":{"href":"https://github.com/reactkr/react/pull/45"},"issue":{"href":"https://api.github.com/repos/reactkr/react/issues/45"},"comments":{"href":"https://api.github.com/repos/reactkr/react/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/reactkr/react/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/reactkr/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactkr/react/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/reactkr/react/statuses/b342224dac1d2e9ba07f31d76c5f18fc5e9c680f"}}}}