Skip to content

Commit 8d6a947

Browse files
committed
Resolve merge conflict
1 parent e1afc89 commit 8d6a947

File tree

5 files changed

+4
-92
lines changed

5 files changed

+4
-92
lines changed

content/docs/code-splitting.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@ console.log(add(16, 26)); // 42
4040
>
4141
> 실제 번들은 위 예시와는 많이 다르게 보일 겁니다.
4242
43-
<<<<<<< HEAD
44-
[Create React App](https://github.com/facebookincubator/create-react-app)이나 [Next.js](https://github.com/zeit/next.js/), [Gatsby](https://www.gatsbyjs.org/) 혹은 비슷한 툴을 사용한다면 여러분이 설치한 앱에서 Webpack을 같이 설치했을 겁니다.
45-
=======
46-
If you're using [Create React App](https://create-react-app.dev/), [Next.js](https://nextjs.org/), [Gatsby](https://www.gatsbyjs.org/), or a similar tool, you will have a Webpack setup out of the box to bundle your
47-
app.
48-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
43+
[Create React App](https://create-react-app.dev/)이나 [Next.js](https://nextjs.org/), [Gatsby](https://www.gatsbyjs.org/) 혹은 비슷한 툴을 사용한다면 여러분이 설치한 앱에서 Webpack을 같이 설치했을 겁니다.
4944

5045
이런 툴을 사용하지 않는다면 여러분이 스스로 번들링을 설정해야 합니다. 이 경우 Webpack의
5146
[설치하기](https://webpack.js.org/guides/installation/) 문서와

content/docs/codebase-overview.md

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,11 @@ React 앱을 개발하는데 있어서 아래 관례들의 사용을 반드시
3535

3636
### 경고와 불변식 {#warnings-and-invariants}
3737

38-
<<<<<<< HEAD
39-
React 코드베이스는 경고를 표시하기 위해 다음과 같이 `warning` 모듈을 사용합니다.
40-
41-
```js
42-
var warning = require('warning');
43-
44-
warning(
45-
2 + 2 === 4,
46-
'Math is not working today.'
47-
);
48-
```
49-
50-
**경고는 `warning`의 대상 조건식이 `false`일 때 표시됩니다.**
51-
52-
해당 옵션은 예외적인 경우보다 일반적인 상황을 반영해야 합니다.
53-
54-
다음과 같은 코드를 통해 중복되는 경고로 콘솔이 불필요하게 복잡해지는 상황을 피할 수 있습니다.
55-
56-
```js
57-
var warning = require('warning');
58-
59-
var didWarnAboutMath = false;
60-
if (!didWarnAboutMath) {
61-
warning(
62-
2 + 2 === 4,
63-
'Math is not working today.'
64-
);
65-
didWarnAboutMath = true;
66-
=======
67-
The React codebase uses `console.error` to display warnings:
38+
React 코드베이스에서는 `console.error`를 사용해 경고를 표시합니다.
6839

6940
```js
7041
if (__DEV__) {
7142
console.error('Something is wrong.');
72-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
7343
}
7444
```
7545

@@ -122,44 +92,7 @@ ReactRef.detachRefs = function(
12292
가능하면 새로 작성하는 코드에 Flow 검사 형식을 포함해 주길 바랍니다.
12393
`yarn flow` 명령어를 통해 Flow에 대한 형식 검사를 직접 수행해 볼 수 있습니다.
12494

125-
<<<<<<< HEAD
126-
### 동적 주입 {#dynamic-injection}
127-
128-
React의 몇 가지 모듈은 동적 주입을 사용합니다. 동적 주입은 항상 명시적이지만 코드에 대한 이해를 방해하기도 합니다. 동적 주입을 사용하는 주된 이유는 React가 DOM을 대상으로만 지원했기 때문입니다. React 네이티브는 React 프로젝트에서 시작되었기 때문에 몇 가지 동작을 구현하기 위해 동적 주입을 필요로 했습니다.
129-
130-
다음과 같은 동적 의존성을 가진 모듈을 확인할 수 있습니다.
131-
132-
```js
133-
// Dynamically injected
134-
var textComponentClass = null;
135-
136-
// Relies on dynamically injected value
137-
function createInstanceForText(text) {
138-
return new textComponentClass(text);
139-
}
140-
141-
var ReactHostComponent = {
142-
createInstanceForText,
143-
144-
// Provides an opportunity for dynamic injection
145-
injection: {
146-
injectTextComponentClass: function(componentClass) {
147-
textComponentClass = componentClass;
148-
},
149-
},
150-
};
151-
152-
module.exports = ReactHostComponent;
153-
```
154-
155-
`injection` 필드는 특별하게 관리되지 않습니다. 다만 관례적으로 해당 필드는 런타임 시에 (플랫폼 관련 요소와 같은) 몇 가지 종속성을 주입하고자 할 때 사용됩니다.
156-
157-
React 코드베이스에는 다수의 동적 주입 부분이 존재합니다. React는 향후 동적 주입에 관련된 매커니즘을 제거하고, 빌드 시에 정적으로 병합하는 방식을 사용할 것입니다.
158-
15995
### 다양한 패키지 {#multiple-packages}
160-
=======
161-
### Multiple Packages {#multiple-packages}
162-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
16396

16497
React는 [monorepo](https://danluu.com/monorepo/)입니다. 해당 저장소는 여러 분리된 패키지를 포함하고 있으며, 각 변경점들은 함께 반영되고 모든 이슈는 한 곳에서 관리됩니다.
16598

@@ -195,7 +128,7 @@ React는 원래 DOM을 대상으로 하여 개발됐지만, 이후 [React 네이
195128
196129
### 재조정자 {#reconcilers}
197130

198-
React DOM과 React 네이티브 같은 매우 다른 경우를 포함하여, 렌더러들은 상당 부분 동작 방식을 서로 공유해야 합니다. 특히 [재조정](/docs/reconciliation.html) 알고리즘의 경우는 더욱 그렇습니다. 이를 통해 렌더링, 사용자 정의 컴포넌트, 상태, 생명주기 메소드, 레퍼런스가 플랫폼에 상관없이 일관적으로 작동해야 합니다.
131+
React DOM과 React 네이티브 같은 매우 다른 경우를 포함하여, 렌더러들은 상당 부분 동작 방식을 서로 공유해야 합니다. 특히 [재조정](/docs/reconciliation.html) 알고리즘의 경우는 더욱 그렇습니다. 이를 통해 렌더링, 사용자 정의 컴포넌트, 상태, 생명주기 메서드, 레퍼런스가 플랫폼에 상관없이 일관적으로 작동해야 합니다.
199132

200133
이를 해결하기 위해 서로 다른 렌더러들은 몇 가지의 코드를 공유하며, 해당 부분을 '재조정자'라고 부릅니다. `setState()`와 같은 함수가 수정되어야 할 때, 재조정자는 트리에 있는 컴포넌트의 `render()` 함수를 호출한 후 마운트나 업데이트, 혹은 마운트해제를 실시합니다.
201134

@@ -223,13 +156,9 @@ React 파이버 구조에 대해 [여기](https://github.com/acdlite/react-fiber
223156

224157
### 이벤트 시스템 {#event-system}
225158

226-
<<<<<<< HEAD
227-
React는 렌더러와 무관하며 React DOM 및 React Native와 함께 작동하는 합성 이벤트 시스템을 구현합니다. 해당 코드는 [`packages/legacy-events`](https://github.com/facebook/react/tree/master/packages/legacy-events)에서 확인할 수 있습니다.
159+
React는 네이티브 이벤트 위에 레이어를 구현하여 크로스 브라우저 차이를 제거했습니다. 해당 코드는 [`packages/react-dom/src/events`](https://github.com/facebook/react/tree/master/packages/react-dom/src/events)에서 확인할 수 있습니다.
228160

229161
해당 코드에 대한 상세한 설명은 다음의 [영상](https://www.youtube.com/watch?v=dRo_egw7tBc) (66분)을 참고하세요.
230-
=======
231-
React implements a layer over native events to smooth out cross-browser differences. Its source code is located in [`packages/react-dom/src/events`](https://github.com/facebook/react/tree/master/packages/react-dom/src/events).
232-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
233162

234163
### 다음 내용은? {#what-next}
235164

content/docs/conditional-rendering.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ ReactDOM.render(
122122

123123
### 논리 && 연산자로 If를 인라인으로 표현하기{#inline-if-with-logical--operator}
124124

125-
<<<<<<< HEAD
126125
JSX 안에는 중괄호를 이용해서 [표현식을 포함](/docs/introducing-jsx.html#embedding-expressions-in-jsx) 할 수 있습니다. 그 안에 JavaScript의 논리 연산자 `&&`를 사용하면 쉽게 엘리먼트를 조건부로 넣을 수 있습니다.
127-
=======
128-
You may [embed expressions in JSX](/docs/introducing-jsx.html#embedding-expressions-in-jsx) by wrapping them in curly braces. This includes the JavaScript logical `&&` operator. It can be handy for conditionally including an element:
129-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
130126

131127
```js{6-10}
132128
function Mailbox(props) {

content/docs/hooks-overview.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,7 @@ function FriendListItem(props) {
228228
}
229229
```
230230

231-
<<<<<<< HEAD
232231
각 컴포넌트의 state는 완전히 독립적입니다. Hook은 state 그 자체가 아니라, *상태 관련 로직*을 재사용하는 방법입니다. 실제로 각각의 Hook *호출*은 완전히 독립된 state를 가집니다. 그래서 심지어는 한 컴포넌트 안에서 같은 custom Hook을 두 번 쓸 수도 있습니다.
233-
=======
234-
The state of each component is completely independent. Hooks are a way to reuse *stateful logic*, not state itself. In fact, each *call* to a Hook has a completely isolated state -- so you can even use the same custom Hook twice in one component.
235-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
236232

237233
Custom Hook은 기능이라기보다는 컨벤션(convention)에 가깝습니다. 이름이 "`use`"로 시작하고, 안에서 다른 Hook을 호출한다면 그 함수를 custom Hook이라고 부를 수 있습니다. `useSomething`이라는 네이밍 컨벤션은 linter 플러그인이 Hook을 인식하고 버그를 찾을 수 있게 해줍니다.
238234

content/tutorial/tutorial.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,7 @@ var newPlayer = Object.assign({}, player, {score: 2});
564564

565565
#### React에서 다시 렌더링하는 시기를 결정함 {#determining-when-to-re-render-in-react}
566566

567-
<<<<<<< HEAD
568567
불변성의 가장 큰 장점은 React에서 _순수 컴포넌트_를 만드는 데 도움을 준다는 것입니다. 변하지 않는 데이터는 변경이 이루어졌는지 쉽게 판단할 수 있으며 이를 바탕으로 컴포넌트가 다시 렌더링할지를 결정할 수 있습니다.
569-
=======
570-
The main benefit of immutability is that it helps you build _pure components_ in React. Immutable data can easily determine if changes have been made, which helps to determine when a component requires re-rendering.
571-
>>>>>>> 63332462bb5afa18ac7a716975b679f4c23cc8a1
572568

573569
`shouldComponentUpdate()`*순수 컴포넌트*를 작성하는 법에 대해 더 알아보고 싶다면 [성능 최적화하기](/docs/optimizing-performance.html#examples)를 보세요.
574570

0 commit comments

Comments
 (0)