Translate 10.5 to Korean
- Up to 60e96ed
Shim Won committed
Mar 1, 2015 at 22:08 UTC
8838a6d9f928e2d4b66b7673a6e01a9c0332bb16
1 file changed
+23
docs/docs/10.5-clone-with-props.ko-KR.md
new
+23
@@ -0,0 +1,23 @@
1
+---
2
+id: clone-with-props-ko-KR
3
+title: ReactElement 클론하기
4
+permalink: clone-with-props-ko-KR.html
5
+prev: test-utils-ko-KR.html
6
+next: update-ko-KR.html
7
+---
8
+
9
+드문 경우긴 하지만 엘리먼트에서 소유하지 않은 엘리먼트의 props를 변경하고 싶을 때가 있습니다. (`this.props.children`로 전달된 엘리먼트의 `className` 변경 같은 경우) 아니면 전달된 엘리먼트의 복사본을 여럿 만들고 싶을 수도 있습니다. 이는 `cloneWithProps()`로 할 수 있습니다.
10
+
11
+#### `ReactElement React.addons.cloneWithProps(ReactElement element, object? extraProps)`
12
+
13
+`element`를 얕은 복사하고 `extraProps`로 넘긴 props를 머지합니다. `className`과 `style` props는 지능적으로 머지됩니다.
14
+
15
+> 주의:
16
+>
17
+> `cloneWithProps`는 `key`를 클론된 엘리먼트에 전송하지 않습니다. 키를 보존하고 싶으시면, `extraProps` 객체에 넣으세요.
18
+>
19
+> ```js
20
+> var clonedElement = cloneWithProps(originalElement, { key : originalElement.key });
21
+> ```
22
+>
23
+> 비슷하게 `ref`도 유지되지 않습니다.