Skip to content

Commit f845590

Browse files
authored
Merge pull request #416 from reactjs/sync-68e4efcf
Sync with reactjs.org @ 68e4efc
2 parents d692a70 + 7d0a973 commit f845590

18 files changed

+86
-109
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The documentation is divided into several sections with a different tone and pur
5555
1. `git push my-fork-name the-name-of-my-branch`
5656
1. Go to the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) and you should see recently pushed branches.
5757
1. Follow GitHub's instructions.
58-
1. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
58+
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
5959

6060
## Translation
6161

content/blog/2017-09-08-dom-attributes-in-react-16.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ React has always provided a JavaScript-centric API to the DOM. Since React compo
3232
<div tabIndex={-1} />
3333
```
3434

35-
This has not changed. However, the way we enforced it in the past forced us to maintain a allowlist of all valid React DOM attributes in the bundle:
35+
This has not changed. However, the way we enforced it in the past forced us to maintain an allowlist of all valid React DOM attributes in the bundle:
3636

3737
```js
3838
// ...

content/blog/2020-10-20-react-v17.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Raect 17 は[新しい JSX トランスフォーム](/blog/2020/09/22/introducin
5858

5959
## React Native {#react-native}
6060

61-
React Native のリリーススケジュールは React と異なっています。現在のところ React Native 0.65 において React 17 のサポートが入ることを期待していますが、正確なバージョンについては変わる可能性があります。いつものように、リリースに関する議論は React Native Community のリリースに関する[イシュートラッカ](https://github.com/react-native-community/releases)で追うことができます。
61+
React Native のリリーススケジュールは React と異なっています。React 17 へのサポートは React Native 0.64 にて追加されました。いつものように、リリースに関する議論は React Native Community のリリースに関する[イシュートラッカ](https://github.com/react-native-community/releases)で追うことができます。
6262

6363
## インストール {#installation}
6464

content/community/conferences.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,37 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1212

1313
## Upcoming Conferences {#upcoming-conferences}
1414

15-
### React fwdays’21 {#react-fwdays-2021}
16-
March 27, 2021 - remote event
15+
### render(ATL) 2021 {#render-atlanta-2021}
16+
September 13-15, 2021. Atlanta, GA, USA
1717

18-
[Website](https://fwdays.com/en/event/react-fwdays-2021) - [Twitter](https://twitter.com/fwdays) - [Facebook](https://www.facebook.com/events/1133828147054286) - [LinkedIn](https://www.linkedin.com/events/reactfwdays-21onlineconference6758046347334582273) - [Meetup](https://www.meetup.com/ru-RU/Fwdays/events/275764431/)
18+
[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl)
1919

20-
### React Summit - Remote Edition 2021 {#react-summit-remote-2021}
21-
April 14-16, 2021, 7am PST / 10am EST / 4pm CEST - remote event
20+
### React Advanced 2021 {#react-advanced-2021}
21+
October 22-23, 2021. In-person in London, UK + remote (hybrid event)
2222

23-
[Website](https://remote.reactsummit.com) - [Twitter](https://twitter.com/reactsummit) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
23+
[Website](https://reactadvanced.com) - [Twitter](http://twitter.com/reactadvanced) - [Facebook](https://www.facebook.com/ReactAdvanced) - [Videos](https://youtube.com/c/ReactConferences)
24+
25+
### React India 2021 {#react-india-2021}
26+
November 12-13, 2021 in Mumbai, India
27+
28+
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia/) - [LinkedIn](https://www.linkedin.com/showcase/14545585) - [YouTube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w/videos)
29+
30+
## Past Conferences {#past-conferences}
2431

2532
### React Case Study Festival 2021 {#react-case-study-festival-2021}
2633
April 27-28, 2021 - remote event
2734

2835
[Website](https://link.geekle.us/react/offsite) - [LinkedIn](https://www.linkedin.com/events/reactcasestudyfestival6721300943411015680/) - [Facebook](https://www.facebook.com/events/255715435820203)
2936

30-
### render(ATL) 2021 {#render-atlanta-2021}
31-
September 13-15, 2021. Atlanta, GA, USA
32-
33-
[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl)
37+
### React Summit - Remote Edition 2021 {#react-summit-remote-2021}
38+
April 14-16, 2021, 7am PST / 10am EST / 4pm CEST - remote event
3439

35-
### React India 2021 {#react-india-2021}
36-
November 12-13, 2021 in Mumbai, India
40+
[Website](https://remote.reactsummit.com) - [Twitter](https://twitter.com/reactsummit) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)
3741

38-
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia/) - [LinkedIn](https://www.linkedin.com/showcase/14545585) - [YouTube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w/videos)
42+
### React fwdays’21 {#react-fwdays-2021}
43+
March 27, 2021 - remote event
3944

40-
## Past Conferences {#past-conferences}
45+
[Website](https://fwdays.com/en/event/react-fwdays-2021) - [Twitter](https://twitter.com/fwdays) - [Facebook](https://www.facebook.com/events/1133828147054286) - [LinkedIn](https://www.linkedin.com/events/reactfwdays-21onlineconference6758046347334582273) - [Meetup](https://www.meetup.com/ru-RU/Fwdays/events/275764431/)
4146

4247
### React Next 2020 {#react-next-2020}
4348
December 1-2, 2020 - remote event

content/community/courses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ permalink: community/courses.html
2828

2929
- [Egghead.io](https://egghead.io/browse/frameworks/react) - Short instructional videos on React and many other topics.
3030

31-
- [Frontend Masters](https://frontendmasters.com/courses/) - Video courses on React and other frontend frameworks.
31+
- [Frontend Masters](https://frontendmasters.com/learn/react/) - Video courses on React.
3232

3333
- [Fullstack React](https://www.fullstackreact.com/) - The up-to-date, in-depth, complete guide to React and friends.
3434

content/community/videos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Videos dedicated to the discussion of React and the React ecosystem.
1313
### React Conf 2019 {#react-conf-2019}
1414

1515
A playlist of videos from React Conf 2019.
16-
<iframe title="React Conf 2019" width="650" height="366" src="https://www.youtube-nocookie.com/embed/videoseries?list=PLPxbbTqCLbGHPxZpw4xj_Wwg8-fdNxJRh" frameborder="0" allowfullscreen></iframe>
16+
<iframe title="React Conf 2019" width="650" height="366" src="https://www.youtube-nocookie.com/embed/playlist?list=PLPxbbTqCLbGHPxZpw4xj_Wwg8-fdNxJRh" frameborder="0" allowfullscreen></iframe>
1717

1818
### React Conf 2018 {#react-conf-2018}
1919

2020
A playlist of videos from React Conf 2018.
21-
<iframe title="React Conf 2018" width="650" height="366" src="https://www.youtube-nocookie.com/embed/videoseries?list=PLPxbbTqCLbGE5AihOSExAa4wUM-P42EIJ" frameborder="0" allowfullscreen></iframe>
21+
<iframe title="React Conf 2018" width="650" height="366" src="https://www.youtube-nocookie.com/embed/playlist?list=PLPxbbTqCLbGE5AihOSExAa4wUM-P42EIJ" frameborder="0" allowfullscreen></iframe>
2222

2323
### React.js Conf 2017 {#reactjs-conf-2017}
2424

content/docs/addons-test-utils.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ var ReactTestUtils = require('react-dom/test-utils'); // ES5 with npm
1919

2020
> 補足:
2121
>
22-
> [`react-testing-library`](https://testing-library.com/react) の使用をおすすめします。これは、エンドユーザがコンポーネントを使用するのと同様の書き方でコンポーネントを使用するテストを書くことを可能にし、かつそれを促進するように設計されています。
22+
> [`react-testing-library`](https://testing-library.com/react) の使用をおすすめします。これは、エンドユーザがコンポーネントを使用するときと同様の方法でコンポーネントを使用するようなテストを書くことを可能にし、かつそれを促進するように設計されています。
2323
>
24-
> また別の手段として、Airbnb が [Enzyme](http://airbnb.io/enzyme/) と呼ばれるテストユーティリティをリリースしています。Enzyme は React コンポーネントの出力のアサート、操作、そして横断的な処理を簡単にしてくれます
24+
> バージョン 16 以下の React を使用している場合、[Enzyme](http://airbnb.io/enzyme/) ライブラリを使うことで React コンポーネントの出力のアサート、操作、そして横断的な処理を簡単に行えます
2525
2626
- [`act()`](#act)
2727
- [`mockComponent()`](#mockcomponent)

content/docs/concurrent-mode-adoption.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ next: concurrent-mode-reference.html
2121
>
2222
> このドキュメントは興味のある読者やアーリーアダプター向けのものです。**React が初めての方はこれらの機能を気にしないで構いません** -- 今すぐに学ぶ必要はありません。
2323
24+
>警告:
25+
>
26+
> 「ブロッキングモード」および `createBlockingRoot` に関する以下の記載はすべて古くなっていますので無視するようにしてください。
27+
2428
</div>
2529

2630
- [インストール](#installation)

content/docs/concurrent-mode-reference.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ prev: concurrent-mode-adoption.html
2828

2929
- [並列モードの有効化](#concurrent-mode)
3030
- [`createRoot`](#createroot)
31-
- [`createBlockingRoot`](#createblockingroot)
3231
- [サスペンス API](#suspense)
3332
- [`Suspense`](#suspensecomponent)
3433
- [`SuspenseList`](#suspenselist)
@@ -47,18 +46,6 @@ ReactDOM.createRoot(rootNode).render(<App />);
4746

4847
並列モードについての詳細は[並列モードのドキュメント](/docs/concurrent-mode-intro.html)を参照してください。
4948

50-
### `createBlockingRoot` {#createblockingroot}
51-
52-
```js
53-
ReactDOM.createBlockingRoot(rootNode).render(<App />)
54-
```
55-
56-
`ReactDOM.render(<App />, rootNode)` を置き換えて[ブロッキングモード](/docs/concurrent-mode-adoption.html#migration-step-blocking-mode)を有効化します。
57-
58-
並列モードにオプトインすることで React の動作方法について意味上の変更が加わります。これは少数のコンポーネントだけで並列モードを使うということが不可能であるということを意味します。このため、いくつかのアプリケーションでは並列モードに直接移行することができないかもしれません。
59-
60-
ブロッキングモードには並列モードの機能の小さなサブセットのみが含まれているので、直接的な移行ができないアプリケーションのための中間的な移行ステップとなることを意図しています。
61-
6249
## サスペンス API {#suspense}
6350

6451
### `Suspense` {#suspensecomponent}

content/docs/forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redirect_from:
99
- "docs/forms-zh-CN.html"
1010
---
1111

12-
自然な HTML のフォーム要素は内部に何らかの状態を持っていますので、フォーム要素は React において他の DOM 要素とちょっと異なる動作をします。例えば、このプレーン HTML によるフォームは 1 つの名前を受け付けます:
12+
HTML のフォーム要素は当然のこととして内部に何らかの状態を持っていますので、フォーム要素は React において他の DOM 要素とちょっと異なる動作をします。例えば、このプレーン HTML によるフォームは 1 つの名前を受け付けます:
1313

1414
```html
1515
<form>

content/docs/handling-events.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@ React でのイベント処理は DOM 要素のイベントの処理と非常に
2929
</button>
3030
```
3131

32-
別の違いとして、React では `false` を返してもデフォルトの動作を抑止することができません。明示的に `preventDefault` を呼び出す必要があります。例えば、プレーンな HTML では、「新しいページを開く」というリンクのデフォルト動作を抑止するために次のように書くことができます
32+
別の違いとして、React では `false` を返してもデフォルトの動作を抑止することができません。明示的に `preventDefault` を呼び出す必要があります。例えば、プレーンな HTML では、「フォームをサブミットする」という form 要素のデフォルト動作を抑止するために次のように書くことができます
3333

3434
```html
35-
<a href="#" onclick="console.log('The link was clicked.'); return false">
36-
Click me
37-
</a>
35+
<form onsubmit="console.log('You clicked submit.'); return false">
36+
<button type="submit">Submit</button>
37+
</form>
3838
```
3939

4040
React では、代わりに次のようになります:
4141

42-
```js{2-5,8}
43-
function ActionLink() {
44-
function handleClick(e) {
42+
```js{3}
43+
function Form() {
44+
function handleSubmit(e) {
4545
e.preventDefault();
46-
console.log('The link was clicked.');
46+
console.log('You clicked submit.');
4747
}
4848
4949
return (
50-
<a href="#" onClick={handleClick}>
51-
Click me
52-
</a>
50+
<form onSubmit={handleSubmit}>
51+
<button type="submit">Submit</button>
52+
</form>
5353
);
5454
}
5555
```
@@ -71,8 +71,8 @@ class Toggle extends React.Component {
7171
}
7272
7373
handleClick() {
74-
this.setState(state => ({
75-
isToggleOn: !state.isToggleOn
74+
this.setState(prevState => ({
75+
isToggleOn: !prevState.isToggleOn
7676
}));
7777
}
7878

content/docs/higher-order-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ const EnhancedComponent = enhance(WrappedComponent)
298298

299299
## 規則:デバッグしやすくするため表示名をラップすること {#convention-wrap-the-display-name-for-easy-debugging}
300300

301-
HOC により作成されたコンテナコンポーネントは他のあらゆるコンポーネントと同様、[React Developer Tools](https://github.com/facebook/react-devtools) に表示されます。デバッグを容易にするため、HOC の結果だと分かるよう表示名を選んでください。
301+
HOC により作成されたコンテナコンポーネントは他のあらゆるコンポーネントと同様、[React Developer Tools](https://github.com/facebook/react/tree/master/packages/react-devtools) に表示されます。デバッグを容易にするため、HOC の結果だと分かるよう表示名を選んでください。
302302

303303
最も一般的な手法は、ラップされるコンポーネントの表示名をラップすることです。つまり高階コンポーネントが `withSubscription` と名付けられ、ラップされるコンポーネントの表示名が `CommentList` である場合、`WithSubscription(CommentList)` という表示名を使用しましょう:
304304

content/docs/hooks-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function Counter({initialCount}) {
7676
> クラスコンポーネントの `setState` メソッドとは異なり、`useState` は自動的な更新オブジェクトのマージを行いません。この動作は関数型の更新形式をスプレッド構文と併用することで再現可能です:
7777
>
7878
> ```js
79+
> const [state, setState] = useState({});
7980
> setState(prevState => {
8081
> // Object.assign would also work
8182
> return {...prevState, ...updatedValues};

content/docs/optimizing-performance.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -156,33 +156,7 @@ module.exports = {
156156

157157
これらが必要なのは本番用ビルドだけであることに留意してください。React の有用な警告文が隠されたり、ビルド速度が大幅に遅くなったりしますので、開発時には `TerserPlugin` を適用しないでください。
158158

159-
## Chrome のパフォーマンスタブでコンポーネントをプロファイルする {#profiling-components-with-the-chrome-performance-tab}
160-
161-
**開発**モードでは、対応するブラウザのパフォーマンス分析ツールで、コンポーネントのマウント・更新・アンマウントの様子を以下のように視覚化することができます。
162-
163-
<center><img src="../images/blog/react-perf-chrome-timeline.png" style="max-width:100%" alt="React components in Chrome timeline" /></center>
164-
165-
Chrome での操作は以下の通り。
166-
167-
1. 一時的に **React DevTools を含むすべての Chrome 拡張機能を無効にする**。無効にしないと、結果が正確でなくなる可能性があります。
168-
169-
2. アプリケーションが開発モードで動作していることを確認する。
170-
171-
3. Chrome DevTools の[**パフォーマンス**](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/timeline-tool)タブを開いて **Record(記録)** ボタンを押す。
172-
173-
4. プロファイル対象のアクションを実行する。なお、20 秒以上は記録しないでください。さもないと Chrome がハングアップすることがあります。
174-
175-
5. 記録を停止する。
176-
177-
6. React イベントが **User Timing** ラベルの下にグループ化される。
178-
179-
さらなる詳細については、[Ben Schwarz によるこの記事](https://calibreapp.com/blog/react-performance-profiling-optimization)を参照ください。
180-
181-
**プロファイル結果の数値は相対的なものであり、コンポーネントは本番環境ではより速くレンダーされる**ことに注意してください。それでも、無関係な UI 部分が誤って更新されているのを見つけたり、どの程度の頻度と深さで UI の更新が発生するのかを知る手助けになるはずです。
182-
183-
現時点では、Chrome、Edge、そして IE のみがこの機能をサポートするブラウザですが、私達は標準の [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) を採用しているので、より多くのブラウザがサポートしてくれることを期待しています。
184-
185-
## DevToolsプロファイラを使用したコンポーネントのプロファイリング {#profiling-components-with-the-devtools-profiler}
159+
## DevTools プロファイラを使用したコンポーネントのプロファイリング {#profiling-components-with-the-devtools-profiler}
186160

187161
`react-dom` 16.5 以降と `react-native` 0.57 以降では、開発モードにおける強化されたプロファイリング機能を React DevTools プロファイラにて提供しています。
188162
このプロファイラの概要はブログ記事 ["Introducing the React Profiler"](/blog/2018/09/10/introducing-the-react-profiler.html) で説明されています。
@@ -199,6 +173,11 @@ React DevTools をまだインストールしていない場合は、以下で
199173
> 本番ビルド版 `react-dom` のプロファイリング可能なバンドルとして `react-dom/profiling` が利用可能です。
200174
> このバンドルの使い方の詳細については、[fb.me/react-profiling](https://fb.me/react-profiling) を参照してください。
201175
176+
> 捕捉
177+
>
178+
> React 17 より前のバージョンでは、標準の [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) を用いて Chrome のパフォーマンスタブでコンポーネントのプロファイリングが行われていました。
179+
> これについての概要は [Ben Schwarz によるこの記事](https://calibreapp.com/blog/react-performance-profiling-optimization)を参照してください。
180+
202181
## 長いリストの仮想化 {#virtualize-long-lists}
203182

204183
アプリケーションが長いデータのリスト(数百〜数千行)をレンダーする場合は、「ウィンドウイング」として知られるテクニックを使うことをおすすめします。このテクニックでは、ある瞬間ごとにはリストの小さな部分集合のみを描画することで、生成する DOM ノードの数およびコンポーネントの再描画にかかる時間を大幅に削減することができます。

0 commit comments

Comments
 (0)