Skip to content

Commit dd19505

Browse files
committed
Resolve merge conflict
Related to 82b8c9f
1 parent 9bdd71a commit dd19505

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

content/docs/reconciliation.md

+9-25
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ React에 이 알고리즘을 적용한다면, 1000개의 엘리먼트를 그리
2727

2828
두 루트 엘리먼트의 타입이 다르면, React는 이전 트리를 버리고 완전히 새로운 트리를 구축합니다. `<a>`에서 `<img>`로, `<Article>`에서 `<Comment>`로, 혹은 `<Button>`에서 `<div>`로 바뀌는 것 모두 트리 전체를 재구축하는 경우입니다.
2929

30-
<<<<<<< HEAD
31-
트리를 버릴 때 이전 DOM 노드들은 모두 파괴됩니다. 컴포넌트 인스턴스는 `componentWillUnmount()`가 실행됩니다. 새로운 트리가 만들어질 때, 새로운 DOM 노드들이 DOM에 삽입됩니다. 그에 따라 컴포넌트 인스턴스는 `componentWillMount()`가 실행되고 `componentDidMount()`가 이어서 실행됩니다. 이전 트리와 연관된 모든 state는 사라집니다.
32-
=======
33-
When tearing down a tree, old DOM nodes are destroyed. Component instances receive `componentWillUnmount()`. When building up a new tree, new DOM nodes are inserted into the DOM. Component instances receive `UNSAFE_componentWillMount()` and then `componentDidMount()`. Any state associated with the old tree is lost.
34-
>>>>>>> 35179e85933265cb7a4f5d51c10fbe70deba3787
30+
트리를 버릴 때 이전 DOM 노드들은 모두 파괴됩니다. 컴포넌트 인스턴스는 `componentWillUnmount()`가 실행됩니다. 새로운 트리가 만들어질 때, 새로운 DOM 노드들이 DOM에 삽입됩니다. 그에 따라 컴포넌트 인스턴스는 `UNSAFE_componentWillMount()`가 실행되고 `componentDidMount()`가 이어서 실행됩니다. 이전 트리와 연관된 모든 state는 사라집니다.
3531

3632
루트 엘리먼트 아래의 모든 컴포넌트도 언마운트되고 그 state도 사라집니다. 예를 들어, 아래와 같은 비교가 일어나면,
3733

@@ -47,17 +43,13 @@ When tearing down a tree, old DOM nodes are destroyed. Component instances recei
4743

4844
이전 `Counter`는 사라지고, 새로 다시 마운트가 될 것입니다.
4945

50-
<<<<<<< HEAD
51-
### DOM 엘리먼트의 타입이 같은 경우 {#dom-elements-of-the-same-type}
52-
=======
53-
>Note:
46+
>주의
5447
>
55-
>These methods are considered legacy and you should [avoid them](/blog/2018/03/27/update-on-async-rendering.html) in new code:
48+
>아래 메서드들은 레거시이며 새로 작성하는 코드에서는 [피해야 합니다.](/blog/2018/03/27/update-on-async-rendering.html)
5649
>
5750
>- `UNSAFE_componentWillMount()`
5851
59-
### DOM Elements Of The Same Type {#dom-elements-of-the-same-type}
60-
>>>>>>> 35179e85933265cb7a4f5d51c10fbe70deba3787
52+
### DOM 엘리먼트의 타입이 같은 경우 {#dom-elements-of-the-same-type}
6153

6254
같은 타입의 두 React DOM 엘리먼트를 비교할 때, React는 두 엘리먼트의 속성을 확인하여, 동일한 내역은 유지하고 변경된 속성들만 갱신합니다. 예를 들어,
6355

@@ -83,26 +75,18 @@ DOM 노드의 처리가 끝나면, React는 이어서 해당 노드의 자식들
8375

8476
### 같은 타입의 컴포넌트 엘리먼트 {#component-elements-of-the-same-type}
8577

86-
<<<<<<< HEAD
87-
컴포넌트가 갱신되면 인스턴스는 동일하게 유지되어 렌더링 간 state가 유지됩니다. React는 새로운 엘리먼트의 내용을 반영하기 위해 현재 컴포넌트 인스턴스의 props를 갱신합니다. 이때 해당 인스턴스의 `componentWillReceiveProps()``componentWillUpdate()`를 호출합니다.
88-
=======
89-
When a component updates, the instance stays the same, so that state is maintained across renders. React updates the props of the underlying component instance to match the new element, and calls `UNSAFE_componentWillReceiveProps()`, `UNSAFE_componentWillUpdate()` and `componentDidUpdate()` on the underlying instance.
90-
>>>>>>> 35179e85933265cb7a4f5d51c10fbe70deba3787
78+
컴포넌트가 갱신되면 인스턴스는 동일하게 유지되어 렌더링 간 state가 유지됩니다. React는 새로운 엘리먼트의 내용을 반영하기 위해 현재 컴포넌트 인스턴스의 props를 갱신합니다. 이때 해당 인스턴스의 `UNSAFE_componentWillReceiveProps()`, `UNSAFE_componentWillUpdate()`, `componentDidUpdate`를 호출합니다.
9179

92-
다음으로 `render()` 메소드가 호출되고 비교 알고리즘이 이전 결과와 새로운 결과를 재귀적으로 처리합니다.
80+
다음으로 `render()` 메서드가 호출되고 비교 알고리즘이 이전 결과와 새로운 결과를 재귀적으로 처리합니다.
9381

94-
<<<<<<< HEAD
95-
## 자식에 대한 재귀적 처리 {#recursing-on-children}
96-
=======
97-
>Note:
82+
>주의
9883
>
99-
>These methods are considered legacy and you should [avoid them](/blog/2018/03/27/update-on-async-rendering.html) in new code:
84+
>아래 메서드들은 레거시이며 새로 작성하는 코드에서는 [피해야 합니다.](/blog/2018/03/27/update-on-async-rendering.html)
10085
>
10186
>- `UNSAFE_componentWillUpdate()`
10287
>- `UNSAFE_componentWillReceiveProps()`
10388
104-
### Recursing On Children {#recursing-on-children}
105-
>>>>>>> 35179e85933265cb7a4f5d51c10fbe70deba3787
89+
## 자식에 대한 재귀적 처리 {#recursing-on-children}
10690

10791
DOM 노드의 자식들을 재귀적으로 처리할 때, React는 기본적으로 동시에 두 리스트를 순회하고 차이점이 있으면 변경을 생성합니다.
10892

0 commit comments

Comments
 (0)