From ca7927604a91886ac1885d2899026b531ac24d10 Mon Sep 17 00:00:00 2001 From: baekjuwon <66767wndnjs@naver.com> Date: Sun, 26 May 2019 15:42:14 +0900 Subject: [PATCH 1/6] pul request --- content/docs/implementation-notes.md | 238 ++++++++++++++------------- 1 file changed, 121 insertions(+), 117 deletions(-) diff --git a/content/docs/implementation-notes.md b/content/docs/implementation-notes.md index a035a5edf..2e618edc7 100644 --- a/content/docs/implementation-notes.md +++ b/content/docs/implementation-notes.md @@ -9,50 +9,51 @@ redirect_from: - "contributing/implementation-notes.html" --- -This section is a collection of implementation notes for the [stack reconciler](/docs/codebase-overview.html#stack-reconciler). +이 부분은 [stack reconciler](/docs/codebase-overview.html#stack-reconciler)에 대한 구현 노트들의 모음입니다. -It is very technical and assumes a strong understanding of React public API as well as how it's divided into core, renderers, and the reconciler. If you're not very familiar with the React codebase, read [the codebase overview](/docs/codebase-overview.html) first. +이는 매우 기술적이고 리액트 퍼블릭 API 뿐만아니라 어떻게 코어, 랜더러, 리콘사일러로 나누어지는지에 대해 깊은 이해가 수반됩니다. 아직 리액트 코드베이스에 친숙하지 않다면, +먼저 [the codebase overview](/docs/codebase-overview.html)를 읽기를 바랍니다. -It also assumes an understanding of the [differences between React components, their instances, and elements](/blog/2015/12/18/react-components-elements-and-instances.html). +이는 [differences between React components, their instances, and elements](/blog/2015/12/18/react-components-elements-and-instances.html)을 이해하는 것을 수반합니다. -The stack reconciler was used in React 15 and earlier. It is located at [src/renderers/shared/stack/reconciler](https://github.com/facebook/react/tree/15-stable/src/renderers/shared/stack/reconciler). +스택 리콘사일러는 리액트 15보다 일찍 사용되었습니다. 이는[src/renderers/shared/stack/reconciler](https://github.com/facebook/react/tree/15-stable/src/renderers/shared/stack/reconciler)에 위치해 있습니다. -### Video: Building React from Scratch {#video-building-react-from-scratch} +### 비디오 : 스크래치로부터 리액트를 설계 {#video-building-react-from-scratch} -[Paul O'Shannessy](https://twitter.com/zpao) gave a talk about [building React from scratch](https://www.youtube.com/watch?v=_MAD4Oly9yg) that largely inspired this document. +[Paul O'Shannessy](https://twitter.com/zpao)는 이 문서에 크게 영감을 주었던 [building React from scratch](https://www.youtube.com/watch?v=_MAD4Oly9yg)에 대해 이야기 하였습니다. +이 문서와 그의 말은 모두 현실 코드베이스의 단순화했기 때문에 여러분은 +두 가지 모두 친숙해 짐으로써 더 깊은 이해를 가질 것입니다. -Both this document and his talk are simplifications of the real codebase so you might get a better understanding by getting familiar with both of them. +### 개요 {#overview} -### Overview {#overview} + reconciler는 공공 API를 가지지 않습니다. 리액트 DOM과 리액트 네이티브와 같은 [Renderers](/docs/codebase-overview.html#stack-renderers)는 사용자가 쓴, 리액트 컴포넌트에 따른 사용자 인터페이스를 효율적으로 업데이트를 하기 위해서 사용합니다. -The reconciler itself doesn't have a public API. [Renderers](/docs/codebase-overview.html#stack-renderers) like React DOM and React Native use it to efficiently update the user interface according to the React components written by the user. +### 재귀적인 과정으로써의 마운트 {#mounting-as-a-recursive-process} -### Mounting as a Recursive Process {#mounting-as-a-recursive-process} - -Let's consider the first time you mount a component: +여러분들이 컴포넌트를 처음 마운트할 때를 고려해 봅시다. ```js ReactDOM.render(, rootEl); ``` -React DOM will pass `` along to the reconciler. Remember that `` is a React element, that is, a description of *what* to render. You can think about it as a plain object: +리액트 DOM은 컨사일러를 통해 ``를 통과하게 할 것입니다. ``은 리액트 엘리먼트이며, 랜더링 할 것을 설명해 놓은 것임을 기억합시다. 이것을 평범한 개체로 생각해도 좋습니다. ```js console.log(); // { type: App, props: {} } ``` -The reconciler will check if `App` is a class or a function. +컨사일러가 `App`이 클래스인지 함수인지를 확인할 것입니다. -If `App` is a function, the reconciler will call `App(props)` to get the rendered element. +`App`이 함수이면, 컨사일러는 랜더링 요소들을 가져오기 위해 `App(props)`를 부를것 입니다. -If `App` is a class, the reconciler will instantiate an `App` with `new App(props)`, call the `componentWillMount()` lifecycle method, and then will call the `render()` method to get the rendered element. +`App`이 클래스면, 컨사일러는 `App`을 `new App(props)`로 인스턴스화 하고, `componentWillMount()` 라이프사이클 메서드를 호출한 후, `render()` 메서드를 호출하여 랜더링 엘리먼트를 가져오게 할 것입니다. -Either way, the reconciler will learn the element `App` "rendered to". +어느 경우든, 컨사일러는 "render to"라는 `App`의 엘리먼트를 알게 될 것입니다. -This process is recursive. `App` may render to a ``, `Greeting` may render to a `