Skip to content

Commit 78bf353

Browse files
merging all conflicts
2 parents ac55dd2 + de497e2 commit 78bf353

16 files changed

+123
-7
lines changed

content/blog/2015-09-02-new-react-developer-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It contains a handful of new features, including:
2020

2121
## Installation {#installation}
2222

23-
Download the new devtools from the [Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) and on [Mozilla Add-ons](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/) for Firefox. If you're developing using React, we highly recommend installing these devtools.
23+
Download the new devtools from the [Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) and on [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/) for Firefox. If you're developing using React, we highly recommend installing these devtools.
2424

2525
If you already have the Chrome extension installed, it should autoupdate within the next week. You can also head to `chrome://extensions` and click "Update extensions now" if you'd like to get the new version today. If you installed the devtools beta, please remove it and switch back to the version from the store to make sure you always get the latest updates and bug fixes.
2626

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: "Introducing the New React DevTools"
3+
author: [bvaughn]
4+
---
5+
We are excited to announce a new release of the React Developer Tools, available today in Chrome, Firefox, and (Chromium) Edge!
6+
7+
## What's changed?
8+
9+
A lot has changed in version 4!
10+
At a high level, this new version should offer significant performance gains and an improved navigation experience.
11+
It also offers full support for React Hooks, including inspecting nested objects.
12+
13+
![DevTools version 4 screenshot](../images/blog/devtools-v4-screenshot.png)
14+
15+
[Visit the interactive tutorial](https://react-devtools-tutorial.now.sh/) to try out the new version or [see the changelog](https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md#400-august-15-2019) for demo videos and more details.
16+
17+
## Which versions of React are supported?
18+
19+
**`react-dom`**
20+
21+
* `0`-`14.x`: Not supported
22+
* `15.x`: Supported (except for the new component filters feature)
23+
* `16.x`: Supported
24+
25+
**`react-native`**
26+
* `0`-`0.61`: Not supported
27+
* `0.62`: Will be supported (when 0.62 is released)
28+
29+
## How do I get the new DevTools?
30+
31+
React DevTools is available as an extension for [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/).
32+
If you have already installed the extension, it should update automatically within the next couple of hours.
33+
34+
If you use the standalone shell (e.g. in React Native or Safari), you can install the new version [from NPM](https://www.npmjs.com/package/react-devtools):
35+
36+
```shell
37+
npm install -g react-devtools@^4
38+
```
39+
40+
## Where did all of the DOM elements go?
41+
42+
The new DevTools provides a way to filter components from the tree to make it easier to navigate deeply nested hierarchies.
43+
Host nodes (e.g. HTML `<div>`, React Native `<View>`) are *hidden by default*, but this filter can be disabled:
44+
45+
![DevTools component filters](../images/blog/devtools-component-filters.gif)
46+
47+
## How do I get the old version back?
48+
49+
If you are working with React Native version 60 (or older) you can install the previous release of DevTools from NPM:
50+
51+
```shell
52+
npm install --dev react-devtools@^3
53+
```
54+
55+
For older versions of React DOM (v0.14 or earlier) you will need to build the extension from source:
56+
57+
```shell
58+
# Checkout the extension source
59+
git clone https://github.com/facebook/react-devtools
60+
61+
cd react-devtools
62+
63+
# Install dependencies and build the unpacked extension
64+
yarn install
65+
yarn build:extension
66+
67+
# Follow the on-screen instructions to complete installation
68+
```
69+
70+
## Thank you!
71+
72+
We'd like to thank everyone who tested the early release of DevTools version 4.
73+
Your feedback helped improve this initial release significantly.
74+
75+
We still have many exciting features planned and feedback is always welcome!
76+
Please feel free to open a [GitHub issue](https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools) or tag [@reactjs on Twitter](https://twitter.com/reactjs).

content/community/articles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ permalink: community/articles.html
1313
- [Timeline for Learning React](https://daveceddia.com/timeline-for-learning-react/) - Dave Ceddia's recommended timeline for learning React and the React ecosystem.
1414
- [Simple React Development in 2017](https://hackernoon.com/simple-react-development-in-2017-113bd563691f) - Joshua Comeau's guide to showcase how easy it can be to start modern React development.
1515
- [Visual Guide to State in React](https://daveceddia.com/visual-guide-to-state-in-react/) - Dave Ceddia's visual guide to React state.
16-
- [The Hands-On Guide to Learning React Hooks](https://www.telerik.com/kendo-react-ui/react-hooks-guide/)
16+
- [The Hands-On Guide to Learning React Hooks](https://www.telerik.com/kendo-react-ui/react-hooks-guide/) - Eric Bishard's step-by-step guide to learning React Hooks.

content/community/conferences.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ May 4-6, 2020. Atlanta, GA, USA.
8282

8383
[Website](https://renderatl.com)
8484

85+
### React Next 2020 {#react-next-2020}
86+
June 15, 2020. Tel Aviv, Israel.
87+
88+
[Website](https://react-next.com/) - [Twitter](https://twitter.com/reactnext) - [Facebook](https://www.facebook.com/ReactNext2016/)
89+
90+
8591
## Past Conferences {#past-conferences}
8692

8793
### React.js Conf 2015 {#reactjs-conf-2015}

content/community/meetups.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
6969

7070
## India {#india}
7171
* [Bangalore](https://www.meetup.com/ReactJS-Bangalore/)
72+
* [Chandigarh](https://www.meetup.com/Chandigarh-React-Developers/)
7273
* [Chennai](https://www.meetup.com/React-Chennai/)
7374
* [Delhi NCR](https://www.meetup.com/React-Delhi-NCR/)
7475
* [Jaipur](https://www.meetup.com/JaipurJS-Developer-Meetup/)
@@ -79,6 +80,9 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
7980
## Israel {#israel}
8081
* [Tel Aviv](https://www.meetup.com/ReactJS-Israel/)
8182

83+
## Malaysia {#malaysia}
84+
* [Penang](https://www.facebook.com/groups/reactpenang/)
85+
8286
## Netherlands {#netherlands}
8387
* [Amsterdam](https://www.meetup.com/React-Amsterdam/)
8488

content/docs/addons-test-utils.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ it('can render and update a counter', () => {
124124

125125
- DOM イベントのディスパッチは、DOM コンテナが `document` に追加されたときだけ動作することを忘れないでください。[React Testing Library](https://testing-library.com/react) のようなヘルパーを使えばボイラープレートのコードを減らせます。
126126

127+
<<<<<<< HEAD
127128
- [`recipes`](/docs/recipes.html) ドキュメントには `act()` がどのように動作するのかについて例や使用法を交えた詳しい解説があります。
129+
=======
130+
- The [`recipes`](/docs/testing-recipes.html) document contains more details on how `act()` behaves, with examples and usage.
131+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
128132
129133
* * *
130134

content/docs/hooks-faq.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,18 @@ prev: hooks-reference.html
6464
React バージョン 16.8.0 より、以下においてフックの安定版の実装が含まれています。
6565

6666
* React DOM
67+
* React Native
6768
* React DOM Server
6869
* React Test Renderer
6970
* React Shallow Renderer
7071

7172
**フックを利用するには、すべての React のパッケージが 16.8.0 以上である必要があります**。例えば React DOM の更新を忘れた場合、フックは動作しません。
7273

74+
<<<<<<< HEAD
7375
React Native はバージョン 0.59 以降でフックをサポートします。
76+
=======
77+
[React Native 0.59](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059) and above support Hooks.
78+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
7479
7580
### クラスコンポーネントを全部書き換える必要があるのですか? {#do-i-need-to-rewrite-all-my-class-components}
7681

content/docs/hooks-intro.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ function Example() {
3131

3232
> 補足
3333
>
34+
<<<<<<< HEAD
3435
> React 16.8.0 がフックをサポートする最初のバージョンです。アップグレードの際は、React DOM を含むすべてのパッケージの更新を忘れないようにしてください。React Native は次の安定リリースでフックをサポートします。
36+
=======
37+
>React 16.8.0 is the first release to support Hooks. When upgrading, don't forget to update all packages, including React DOM.
38+
>React Native supports Hooks since [the 0.59 release of React Native](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059).
39+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
3540
3641
## ビデオによる紹介 {#video-introduction}
3742

content/docs/jsx-in-depth.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,11 @@ function ListOfTenThings() {
423423
<div>{true}</div>
424424
```
425425

426+
<<<<<<< HEAD
426427
これは条件に応じて React 要素を表示する際に活用できます。次の例は `showHeader``true` のときに限って `<Header />` が表示されます。
428+
=======
429+
This can be useful to conditionally render React elements. This JSX renders the `<Header />` component only if `showHeader` is `true`:
430+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
427431
428432
```js{2}
429433
<div>

content/docs/optimizing-performance.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ React はレンダーされた UI の内部表現を構築し、維持します
211211

212212
コンポーネントの props や state が変更された場合、React は新しく返された要素と以前にレンダーされたものとを比較することで、実際の DOM の更新が必要かを判断します。それらが等しくない場合、React は DOM を更新します。
213213

214+
<<<<<<< HEAD
214215
以下の React DevTools を使用することで、仮想 DOM のこれらの再レンダーを視覚化できるようになりました。
215216

216217
- [Chrome ブラウザ拡張](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
@@ -230,6 +231,9 @@ React はレンダーされた UI の内部表現を構築し、維持します
230231
2 つ目の TODO 項目を入力しているとき、1 つ目の TODO 項目もキーストロークの度に画面上で点滅することに注意してください。これは、入力によって React が一緒に再レンダーしていることを意味します。これは「無駄な」レンダーと呼ばれることがあります。最初の TODO 項目の内容は変更されていないので、再レンダーの必要がないことを我々は知っていますが、React はそれを知りません。
231232

232233
React は変更された DOM ノードだけを更新するとはいえ、再レンダーには時間がかかります。多少の時間がかかっても多くの場合は問題にはなりませんが、遅延が目立つ場合、再レンダープロセスが開始される前にトリガーされるライフサイクル関数 `shouldComponentUpdate` をオーバーライド定義することで、スピードを抜本的に向上できます。この関数のデフォルトの実装は `true` を返し、React に更新処理をそのまま実行させます:
234+
=======
235+
Even though React only updates the changed DOM nodes, re-rendering still takes some time. In many cases it's not a problem, but if the slowdown is noticeable, you can speed all of this up by overriding the lifecycle function `shouldComponentUpdate`, which is triggered before the re-rendering process starts. The default implementation of this function returns `true`, leaving React to perform the update:
236+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
233237
234238
```javascript
235239
shouldComponentUpdate(nextProps, nextState) {
@@ -399,6 +403,7 @@ function updateColorMap(colormap) {
399403

400404
Create React App を使用しているなら、`Object.assign` およびオブジェクトのスプレッド構文の両方がデフォルトで利用できます。
401405

406+
<<<<<<< HEAD
402407
## 不変(イミュータブル)なデータ構造の使用 {#using-immutable-data-structures}
403408

404409
[Immutable.js](https://github.com/facebook/immutable-js) はこの問題を解決する別の方法であり、構造の共有を元にした、不変で永続的なデータのコレクションを提供します。
@@ -432,3 +437,6 @@ x === z; // true
432437
不変データの使用を助けてくる他のライブラリに [Immer](https://github.com/mweststrate/immer)[immutability-helper](https://github.com/kolodny/immutability-helper)[seamless-immutable](https://github.com/rtfeldman/seamless-immutable) があります。
433438

434439
不変データ構造はオブジェクトの変化の検出を容易にします。まさにそれが `shouldComponentUpdate` の実装に必要なことのすべてです。これによってパフォーマンスを大幅に向上できる場合があります。
440+
=======
441+
When you deal with deeply nested objects, updating them in an immutable way can feel convoluted. If you run into this problem, check out [Immer](https://github.com/mweststrate/immer) or [immutability-helper](https://github.com/kolodny/immutability-helper). These libraries let you write highly readable code without losing the benefits of immutability.
442+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b

content/docs/reference-profiler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ render(
4444
<Profiler id="Main" onRender={callback}>
4545
<Main {...props} />
4646
</Profiler>
47-
</App>
47+
</App>
4848
);
4949
```
5050

content/docs/reference-test-renderer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ expect(testInstance.findByProps({className: "sub"}).children).toEqual(['Sub']);
103103
TestRenderer.create(element, options);
104104
```
105105

106+
<<<<<<< HEAD
106107
渡された React 要素から `TestRenderer` インスタンスを作成します。実際の DOM は使用しませんが、コンポーネントを完全な形でメモリにレンダーするので、アサーションを行うことができます。返されたインスタンスは、次のメソッドとプロパティを持ちます。
108+
=======
109+
Create a `TestRenderer` instance with the passed React element. It doesn't use the real DOM, but it still fully renders the component tree into memory so you can make assertions about it. Returns a [TestRenderer instance](#testrenderer-instance).
110+
>>>>>>> de497e250340ff597ce4964279369f16315b8b4b
107111
108112
### `TestRenderer.act()` {#testrendereract}
109113

content/docs/static-type-checking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,21 @@ Flow は JavaScript 言語を拡張し、型定義のための特殊な記法を
8888
yarn を使っている場合:
8989

9090
```bash
91-
yarn add --dev babel-preset-flow
91+
yarn add --dev @babel/preset-flow
9292
```
9393

9494
npm を使っている場合:
9595

9696
```bash
97-
npm install --save-dev babel-preset-flow
97+
npm install --save-dev @babel/preset-flow
9898
```
9999

100100
そして、`flow` のプリセットを [Babel の設定ファイル](https://babeljs.io/docs/usage/babelrc/) に追加してください。例えば、Babel の設定を `.babelrc` ファイルで行っている場合は以下のようになります。
101101

102102
```js{3}
103103
{
104104
"presets": [
105-
"flow",
105+
"@babel/preset-flow",
106106
"react"
107107
]
108108
}
Loading
124 KB
Loading

src/components/CodeEditor/CodeEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class CodeEditor extends Component {
270270

271271
_updateState(code, showJSX = true) {
272272
try {
273-
let newState = {
273+
const newState = {
274274
compiled: compileES5(code),
275275
error: null,
276276
};

0 commit comments

Comments
 (0)