Skip to content

Commit b5b8a10

Browse files
authored
Merge pull request #237 from reactjs/sync-63332462
Sync with reactjs.org @ 6333246
2 parents 0dc9d08 + 8d6a947 commit b5b8a10

File tree

5 files changed

+10
-65
lines changed

5 files changed

+10
-65
lines changed

content/blog/2019-08-15-new-react-devtools.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ It also offers full support for React Hooks, including inspecting nested objects
2323
* `16.x`: Supported
2424

2525
**`react-native`**
26-
* `0`-`0.61`: Not supported
27-
* `0.62`: Will be supported (when 0.62 is released)
26+
* `0`-`0.61.x`: Not supported
27+
* `0.62`: Supported
2828

2929
## How do I get the new DevTools? {#how-do-i-get-the-new-devtools}
3030

content/docs/code-splitting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ console.log(add(16, 26)); // 42
4040
>
4141
> 실제 번들은 위 예시와는 많이 다르게 보일 겁니다.
4242
43-
[Create React App](https://github.com/facebookincubator/create-react-app)이나 [Next.js](https://github.com/zeit/next.js/), [Gatsby](https://www.gatsbyjs.org/) 혹은 비슷한 툴을 사용한다면 여러분이 설치한 앱에서 Webpack을 같이 설치했을 겁니다.
43+
[Create React App](https://create-react-app.dev/)이나 [Next.js](https://nextjs.org/), [Gatsby](https://www.gatsbyjs.org/) 혹은 비슷한 툴을 사용한다면 여러분이 설치한 앱에서 Webpack을 같이 설치했을 겁니다.
4444

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

content/docs/codebase-overview.md

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

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

38-
React 코드베이스는 경고를 표시하기 위해 다음과 같이 `warning` 모듈을 사용합니다.
38+
React 코드베이스에서는 `console.error`를 사용해 경고를 표시합니다.
3939

4040
```js
41-
var warning = require('warning');
42-
43-
warning(
44-
2 + 2 === 4,
45-
'Math is not working today.'
46-
);
47-
```
48-
49-
**경고는 `warning`의 대상 조건식이 `false`일 때 표시됩니다.**
50-
51-
해당 옵션은 예외적인 경우보다 일반적인 상황을 반영해야 합니다.
52-
53-
다음과 같은 코드를 통해 중복되는 경고로 콘솔이 불필요하게 복잡해지는 상황을 피할 수 있습니다.
54-
55-
```js
56-
var warning = require('warning');
57-
58-
var didWarnAboutMath = false;
59-
if (!didWarnAboutMath) {
60-
warning(
61-
2 + 2 === 4,
62-
'Math is not working today.'
63-
);
64-
didWarnAboutMath = true;
41+
if (__DEV__) {
42+
console.error('Something is wrong.');
6543
}
6644
```
6745

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

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

15297
React는 [monorepo](https://danluu.com/monorepo/)입니다. 해당 저장소는 여러 분리된 패키지를 포함하고 있으며, 각 변경점들은 함께 반영되고 모든 이슈는 한 곳에서 관리됩니다.
@@ -183,7 +128,7 @@ React는 원래 DOM을 대상으로 하여 개발됐지만, 이후 [React 네이
183128
184129
### 재조정자 {#reconcilers}
185130

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

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

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

212157
### 이벤트 시스템 {#event-system}
213158

214-
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)에서 확인할 수 있습니다.
215160

216161
해당 코드에 대한 상세한 설명은 다음의 [영상](https://www.youtube.com/watch?v=dRo_egw7tBc) (66분)을 참고하세요.
217162

content/docs/release-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You may find it valuable to run integration tests against Experimental. This is
8888

8989
#### How Can I Learn More About Experimental Features? {#how-can-i-learn-more-about-experimental-features}
9090

91-
Experimental features may or may not be documented. Usually, experiments aren't documented until they are close to shipping in Next or Stable.
91+
Experimental features may or may not be documented. Usually, experiments aren't documented until they are close to shipping in Next or Latest.
9292

9393
If a feature is not documented, they may be accompanied by an [RFC](https://github.com/reactjs/rfcs).
9494

src/components/LayoutHeader/DocSearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class DocSearch extends Component<{}, State> {
4444
alignItems: 'center',
4545
paddingLeft: '0.25rem',
4646
paddingRight: '0.25rem',
47-
4847
[media.lessThan('expandedSearch')]: {
4948
justifyContent: 'flex-end',
5049
marginRight: 10,
@@ -56,6 +55,7 @@ class DocSearch extends Component<{}, State> {
5655
// },
5756
[media.greaterThan('expandedSearch')]: {
5857
minWidth: 100,
58+
width: 'calc(100% / 5)',
5959
},
6060
}}>
6161
<input

0 commit comments

Comments
 (0)