Skip to content

Commit 53d0c11

Browse files
authored
Merge pull request #322 from reactjs/sync-7e4f503d
Sync with reactjs.org @ 7e4f503
2 parents ac4b5d7 + 81ac565 commit 53d0c11

39 files changed

+6962
-6178
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:8
5+
- image: circleci/node:12
66
steps:
77
- checkout
88
- restore_cache:
99
keys:
10-
- dependencies-{{ checksum "yarn.lock" }}
10+
- dependencies-{{ checksum "yarn.lock" }}
1111
- run:
1212
name: Install
1313
command: yarn install --pure-lockfile

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/carbon
1+
lts/erbium

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This repo contains the source code and documentation powering [ja.reactjs.org](h
99
### Prerequisites
1010

1111
1. Git
12-
1. Node: any 8.x version starting with 8.4.0 or greater
12+
1. Node: any 12.x version starting with v12.0.0 or greater
1313
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1414
1. A fork of the repo (for any contributions)
1515
1. A clone of the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) on your local machine

content/blog/2013-06-19-community-roundup-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Since the launch we have received a lot of feedback and are actively working on
99

1010
[Andrew Greig](http://www.andrewgreig.com/) made a blog post that gives a high level description of what React is.
1111

12-
> I have been using Facebooks recently released JavaScript framework called React.js for the last few days and have managed to obtain a rather high level understanding of how it works and formed a good perspective on how it fits in to the entire javascript framework ecosystem.
12+
> I have been using Facebook's recently released JavaScript framework called React.js for the last few days and have managed to obtain a rather high level understanding of how it works and formed a good perspective on how it fits in to the entire javascript framework ecosystem.
1313
>
1414
> Basically, React is not an MVC framework. It is not a replacement for Backbone or Knockout or Angular, instead it is designed to work with existing frameworks and help extend their functionality.
1515
>

content/blog/2015-03-26-introducing-react-native.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ For more details, see [Tom Occhino's post on the Facebook Engineering blog](http
1313
>
1414
> *It's worth noting that we're not chasing “write once, run anywhere.” Different platforms have different looks, feels, and capabilities, and as such, we should still be developing discrete apps for each platform, but the same set of engineers should be able to build applications for whatever platform they choose, without needing to learn a fundamentally different set of technologies for each. We call this approach “learn once, write anywhere.”*
1515
16-
To learn more, visit the [React Native website](https://facebook.github.io/react-native/).
16+
To learn more, visit the [React Native website](https://reactnative.dev/).

content/blog/2015-05-01-graphql-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "GraphQL Introduction"
33
author: [schrockn]
44
---
55

6-
At the React.js conference in late January 2015, we revealed our next major technology in the React family: [Relay](http://facebook.github.io/react/blog/2015/02/20/introducing-relay-and-graphql.html).
6+
At the React.js conference in late January 2015, we revealed our next major technology in the React family: [Relay](/blog/2015/02/20/introducing-relay-and-graphql.html).
77

88
Relay is a new way of structuring client applications that co-locates data-fetching requirements and React components. Instead of placing data fetching logic in some other part of the client application – or embedding this logic in a custom endpoint on the server – we instead co-locate a *declarative* data-fetching specification alongside the React component. The language of this declarative specification is GraphQL.
99

content/blog/2018-06-07-you-probably-dont-need-derived-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Problems arise when any of these constraints are changed. This typically comes i
4040

4141
A common misconception is that `getDerivedStateFromProps` and `componentWillReceiveProps` are only called when props "change". These lifecycles are called any time a parent component rerenders, regardless of whether the props are "different" from before. Because of this, it has always been unsafe to _unconditionally_ override state using either of these lifecycles. **Doing so will cause state updates to be lost.**
4242

43-
Let’s consider an example to demonstrate the problem. Here is a `EmailInput` component that "mirrors" an email prop in state:
43+
Let’s consider an example to demonstrate the problem. Here is an `EmailInput` component that "mirrors" an email prop in state:
4444
```js
4545
class EmailInput extends Component {
4646
state = { email: this.props.email };

content/blog/2018-11-13-react-conf-recap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ On the morning of Day 2, Andrew Clark and Brian Vaughn presented Concurrent Rend
2121

2222
<iframe width="560" height="315" src="https://www.youtube.com/embed/UcqRXTriUVI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2323

24-
In the afternoon, Parashuram N spoke in detail about React Native’s New Architecture, a long-term project that the React Native team has been working on over the past year and [announced in June](https://facebook.github.io/react-native/blog/2018/06/14/state-of-react-native-2018). We’re really excited about the potential of this project to improve performance, simplify interoperability with other libraries, and set a strong foundation for the future of React Native.
24+
In the afternoon, Parashuram N spoke in detail about React Native’s New Architecture, a long-term project that the React Native team has been working on over the past year and [announced in June](https://reactnative.dev/blog/2018/06/14/state-of-react-native-2018). We’re really excited about the potential of this project to improve performance, simplify interoperability with other libraries, and set a strong foundation for the future of React Native.
2525

2626
Now that the conference is over, all 28 conference talks are [available to stream online](https://www.youtube.com/playlist?list=PLPxbbTqCLbGE5AihOSExAa4wUM-P42EIJ). There are tons of great ones from both days. We can’t wait until next year!

content/blog/2019-02-23-is-react-translated-yet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Creating the [sync script](https://github.com/reactjs/reactjs.org-translation/bl
5555

5656
The problem was finding a place for the bot to run. I'm a frontend developer for a reason -- Heroku and its ilk are alien to me and *endlessly* frustrating. In fact, until this past Tuesday, I was running the script by hand on my local machine!
5757

58-
The biggest challenge was space. Each fork of the repo is around 100MB -- which takes minutes to clone on my local machine. We have *32* forks, and the free tiers or most deployment platforms I checked limited you to 512MB of storage.
58+
The biggest challenge was space. Each fork of the repo is around 100MB -- which takes minutes to clone on my local machine. We have *32* forks, and the free tiers of most deployment platforms I checked limited you to 512MB of storage.
5959

6060
After lots of notepad calculations, I found a solution: delete each repo once we've finished the script and limit the concurrency of `sync` scripts that run at once to be within the storage requirements. Luckily, Heroku dynos have a much faster Internet connection and are able to clone even the React repo quickly.
6161

content/blog/2019-08-08-react-v16.9.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ These estimates were too optimistic, and we've needed to adjust them.
149149

150150
**tldr:** We shipped Hooks on time, but we're regrouping Concurrent Mode and Suspense for Data Fetching into a single release that we intend to release later this year.
151151

152-
In February, we [shipped a stable 16.8 release](/blog/2019/02/06/react-v16.8.0.html) including React Hooks, with React Native support coming [a month later](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059). However, we underestimated the follow-up work for this release, including the lint rules, developer tools, examples, and more documentation. This shifted the timeline by a few months.
152+
In February, we [shipped a stable 16.8 release](/blog/2019/02/06/react-v16.8.0.html) including React Hooks, with React Native support coming [a month later](https://reactnative.dev/blog/2019/03/12/releasing-react-native-059). However, we underestimated the follow-up work for this release, including the lint rules, developer tools, examples, and more documentation. This shifted the timeline by a few months.
153153

154154
Now that React Hooks are rolled out, the work on Concurrent Mode and Suspense for Data Fetching is in full swing. The [new Facebook website that's currently in active development](https://twitter.com/facebook/status/1123322299418124289) is built on top of these features. Testing them with real code helped discover and address many issues before they can affect the open source users. Some of these fixes involved an internal redesign of these features, which has also caused the timeline to slip.
155155

content/blog/2020-02-26-react-v16.13.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Warning: Cannot update a component from inside the function body of a different
2121

2222
**This warning will help you find application bugs caused by unintentional state changes.** In the rare case that you intentionally want to change the state of another component as a result of rendering, you can wrap the `setState` call into `useEffect`.
2323

24-
### Warnings for conflicting style rules
24+
### Warnings for conflicting style rules {#warnings-for-conflicting-style-rules}
2525

2626
When dynamically applying a `style` that contains longhand and shorthand versions of CSS properties, particular combinations of updates can cause inconsistent styling. For example:
2727

content/community/conferences.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ 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-
### ReactConf Japan 2020 {#reactconfjp-2020}
16-
March 21, 2020 in Tokyo, Japan
17-
18-
[Website](https://reactconf.jp/) - [Twitter](https://twitter.com/reactjp)
19-
2015
### Reactathon 2020 {#reactathon-2020}
2116
March 30 - 31, 2020 in San Francisco, CA
2217

@@ -42,11 +37,6 @@ May 1, 2020. Streamed online on YouTube.
4237

4338
[Website](https://www.bytesized.xyz) - [Twitter](https://twitter.com/bytesizedcode) - [YouTube](https://www.youtube.com/channel/UC046lFvJZhiwSRWsoH8SFjg)
4439

45-
### render(ATL) 2020 {#render-atlanta-2020}
46-
May 4-6, 2020. Atlanta, GA, USA.
47-
48-
[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/)
49-
5040
### ReactEurope 2020 {#reacteurope-2020}
5141
May 14-15, 2020 in Paris, France
5242

@@ -82,6 +72,11 @@ July 29-30, 2020. Portland, Oregon, USA.
8272

8373
[Website](https://infinite.red/ChainReactConf) - [Twitter](https://twitter.com/ChainReactConf)
8474

75+
### render(ATL) 2020 {#render-atlanta-2020}
76+
August 24-26, 2020. Atlanta, GA, USA.
77+
78+
[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)
79+
8580
### ComponentsConf 2020 {#components20}
8681
September 1, 2020 in Melbourne, Australia
8782

content/docs/codebase-overview.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ redirect_from:
1515

1616
これらの規約のいずれかをあなたの React アプリケーションで推奨しているというわけでは必ずしもありません。規約の多くは歴史的な理由で存在しており、時間とともに変化する可能性があります。
1717

18-
### 外部の依存関係 {#external-dependencies}
19-
20-
React はほとんど外部の依存関係を持っていません。通常、`require()` は React 自身のコードベースのファイルを指します。ただし、比較的にまれな例外がいくつかあります。
21-
22-
[fbjs リポジトリ](https://github.com/facebook/fbjs)は React がいくつかの小さなユーティリティを [Relay](https://github.com/facebook/relay) のようなライブラリと共有し、それらと同期を保つために存在しています。Facebook のエンジニアが必要に応じて変更を行えるようであってほしいので、Node のエコシステムにある同等の小さなモジュール群には依存しません。fbjs 内にあるユーティリティは全て非公開 API であり、それらは React のような Facebook プロジェクトでのみ使用されるためのものです。
23-
2418
### 最上位フォルダ {#top-level-folders}
2519

2620
[React リポジトリ](https://github.com/facebook/react)をクローンした後、プロジェクトのルートディレクトリに複数のフォルダがあることに気がつくでしょう:
@@ -171,7 +165,7 @@ React core のコードはソースツリーの [`packages/react`](https://githu
171165

172166
### レンダラ {#renderers}
173167

174-
React は元々 DOM のために作成されましたが、後になって [React Native](http://facebook.github.io/react-native/) によりネイティブなプラットフォームもサポートするようになりました。これにより React の内部に "レンダラ (renderer)" の概念が導入されました。
168+
React は元々 DOM のために作成されましたが、後になって [React Native](https://reactnative.dev/) によりネイティブなプラットフォームもサポートするようになりました。これにより React の内部に "レンダラ (renderer)" の概念が導入されました。
175169

176170
**レンダラは React ツリーを、基盤となるプラットフォーム固有の呼び出しへと変換する方法を管理します。**
177171

content/docs/conditional-rendering.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ render() {
176176
const isLoggedIn = this.state.isLoggedIn;
177177
return (
178178
<div>
179-
{isLoggedIn ? (
180-
<LogoutButton onClick={this.handleLogoutClick} />
181-
) : (
182-
<LoginButton onClick={this.handleLoginClick} />
183-
)}
179+
{isLoggedIn
180+
? <LogoutButton onClick={this.handleLogoutClick} />
181+
: <LoginButton onClick={this.handleLoginClick} />
182+
}
184183
</div>
185184
);
186185
}

content/docs/design-principles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ UI は動的ですが、props と state の同期的な `render()` 関数によ
126126

127127
### DOM を超えて {#beyond-the-dom}
128128

129-
私たちは React の価値を、バグの少ないコンポーネントを書いてうまく構成することができるという点に見ています。DOM は React のオリジナルのレンダーターゲットですが、[React Native](https://facebook.github.io/react-native/) は Facebook とコミュニティの両方において同じくらい重要です。
129+
私たちは React の価値を、バグの少ないコンポーネントを書いてうまく構成することができるという点に見ています。DOM は React のオリジナルのレンダーターゲットですが、[React Native](https://reactnative.dev/) は Facebook とコミュニティの両方において同じくらい重要です。
130130

131131
レンダラーに依存しないことは React の重要な設計上の制約です。それは内部表現にいくらかのオーバーヘッドを追加します。その一方で、コアへの改善はすべてのプラットフォームに行きわたります。
132132

content/docs/handling-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LoggingButton extends React.Component {
130130
render() {
131131
// This syntax ensures `this` is bound within handleClick
132132
return (
133-
<button onClick={(e) => this.handleClick(e)}>
133+
<button onClick={() => this.handleClick()}>
134134
Click me
135135
</button>
136136
);

content/docs/hooks-faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ React バージョン 16.8.0 より、以下においてフックの安定版の
7171

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

74-
React Native は[バージョン 0.59](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059) 以降でフックをサポートします。
74+
React Native は[バージョン 0.59](https://reactnative.dev/blog/2019/03/12/releasing-react-native-059) 以降でフックをサポートします。
7575

7676
### クラスコンポーネントを全部書き換える必要があるのですか? {#do-i-need-to-rewrite-all-my-class-components}
7777

@@ -588,7 +588,7 @@ function ProductPage({ productId }) {
588588
const [product, setProduct] = useState(null);
589589
590590
async function fetchProduct() {
591-
const response = await fetch('http://myapi/product' + productId); // Uses productId prop
591+
const response = await fetch('http://myapi/product/' + productId); // Uses productId prop
592592
const json = await response.json();
593593
setProduct(json);
594594
}
@@ -609,7 +609,7 @@ function ProductPage({ productId }) {
609609
useEffect(() => {
610610
// By moving this function inside the effect, we can clearly see the values it uses.
611611
async function fetchProduct() {
612-
const response = await fetch('http://myapi/product' + productId);
612+
const response = await fetch('http://myapi/product/' + productId);
613613
const json = await response.json();
614614
setProduct(json);
615615
}

content/docs/hooks-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Example() {
3131

3232
> 補足
3333
>
34-
> React 16.8.0 がフックをサポートする最初のバージョンです。アップグレードの際は、React DOM を含むすべてのパッケージの更新を忘れないようにしてください。React Native は [React Native 0.59 リリース](https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059)以降でフックをサポートします。
34+
> React 16.8.0 がフックをサポートする最初のバージョンです。アップグレードの際は、React DOM を含むすべてのパッケージの更新を忘れないようにしてください。React Native は [React Native 0.59 リリース](https://reactnative.dev/blog/2019/03/12/releasing-react-native-059)以降でフックをサポートします。
3535
3636
## ビデオによる紹介 {#video-introduction}
3737

content/docs/hooks-rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ prev: hooks-effect.html
2727

2828
これらの 2 つのルールを強制できる [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) という ESLint のプラグインをリリースしました。試したい場合はあなたのプロジェクトに以下のようにして加えることができます。
2929

30+
このプラグインは [Create React App](/docs/create-a-new-react-app.html#create-react-app) ではデフォルトで含まれています。
31+
3032
```bash
3133
npm install eslint-plugin-react-hooks --save-dev
3234
```
@@ -46,8 +48,6 @@ npm install eslint-plugin-react-hooks --save-dev
4648
}
4749
```
4850

49-
このプラグインは [Create React App](/docs/create-a-new-react-app.html#create-react-app) ではデフォルトで含まれています。
50-
5151
**次のページまで飛ばして[独自のフック](/docs/hooks-custom.html)を書く方法について学んでも構いません。**このページの続きの部分ではこれらのルールの背後にある根拠について述べていきます。
5252

5353
## 解説 {#explanation}

0 commit comments

Comments
 (0)