From 2547b2dc2d56d0d66108dab28b34ece5a38314a4 Mon Sep 17 00:00:00 2001 From: pasteisdenata Date: Fri, 1 Apr 2022 11:01:04 +0200 Subject: [PATCH 01/30] Update sharing-state-between-components.md test fork --- beta/src/pages/learn/sharing-state-between-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/pages/learn/sharing-state-between-components.md b/beta/src/pages/learn/sharing-state-between-components.md index a068a6ea9..fdf564288 100644 --- a/beta/src/pages/learn/sharing-state-between-components.md +++ b/beta/src/pages/learn/sharing-state-between-components.md @@ -4,7 +4,7 @@ title: Sharing State Between Components -Sometimes, you want the state of two components to always change together. To do it, remove state from both of them, move it to their closest common parent, and then pass it down to them via props. This is known as "lifting state up", and it's one of the most common things you will do writing React code. +時々, you want the state of two components to always change together. To do it, remove state from both of them, move it to their closest common parent, and then pass it down to them via props. This is known as "lifting state up", and it's one of the most common things you will do writing React code. From 0bd3ce1c1372f148ff31795487f8bef671d1d08e Mon Sep 17 00:00:00 2001 From: pasteisdenata Date: Fri, 1 Apr 2022 11:06:17 +0200 Subject: [PATCH 02/30] Update sharing-state-between-components.md revert sometimes --- beta/src/pages/learn/sharing-state-between-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/pages/learn/sharing-state-between-components.md b/beta/src/pages/learn/sharing-state-between-components.md index f07ce3cc1..1b0661f5f 100644 --- a/beta/src/pages/learn/sharing-state-between-components.md +++ b/beta/src/pages/learn/sharing-state-between-components.md @@ -4,7 +4,7 @@ title: Sharing State Between Components -時々, you want the state of two components to always change together. To do it, remove state from both of them, move it to their closest common parent, and then pass it down to them via props. This is known as "lifting state up", and it's one of the most common things you will do writing React code. +Sometimes, you want the state of two components to always change together. To do it, remove state from both of them, move it to their closest common parent, and then pass it down to them via props. This is known as "lifting state up", and it's one of the most common things you will do writing React code. From b0bb6f6c177233b14faed2b416de2672b5249de8 Mon Sep 17 00:00:00 2001 From: pasteisdenata Date: Sun, 10 Apr 2022 22:18:50 +0200 Subject: [PATCH 03/30] Update adding-interactivity.md first commit for review --- beta/src/pages/learn/adding-interactivity.md | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/beta/src/pages/learn/adding-interactivity.md b/beta/src/pages/learn/adding-interactivity.md index 73b7e0597..cf7961e7e 100644 --- a/beta/src/pages/learn/adding-interactivity.md +++ b/beta/src/pages/learn/adding-interactivity.md @@ -1,30 +1,30 @@ --- -title: Adding Interactivity +title: インタラクティビティの追加 --- -Some things on the screen update in response to user input. For example, clicking an image gallery switches the active image. In React, data that changes over time is called state. You can add state to any component, and update it as needed. In this chapter, you'll learn how to write components that handle interactions, update their state, and display different output over time. +ユーザの入力に反応して更新されるものが画面上にあります。例えば、イメージギャラリーをクリックするとアクティブなイメージが切り替わります。React では、時間の経過とともに変化するデータのことを state と呼びます。任意のコンポーネントに state を追加することができ、必要に応じて更新することが出来ます。この章では、インタラクションを処理し、その state を更新し、時間の経過とともに異なる出力を表示するコンポーネントの作成方法について学びます。 -* [How to handle user-initiated events](/learn/responding-to-events) -* [How to make components "remember" information with state](/learn/state-a-components-memory) -* [How React updates the UI in two phases](/learn/render-and-commit) -* [Why state doesn't update right after you change it](/learn/state-as-a-snapshot) -* [How to queue multiple state updates](/learn/queueing-a-series-of-state-updates) -* [How to update an object in state](/learn/updating-objects-in-state) -* [How to update an array in state](/learn/updating-arrays-in-state) +* [ユーザー起動イベントの扱い方](/learn/responding-to-events) +* [state でコンポーネントに情報を 「記憶」させる方法](/learn/state-a-components-memory) +* [React が 2 段階で UI を更新する仕組み](/learn/render-and-commit) +* [変更後すぐに state が更新されない理由](/learn/state-as-a-snapshot) +* [複数の state の更新をキューに入れる方法](/learn/queueing-a-series-of-state-updates) +* [state 内のオブジェクトを更新する方法](/learn/updating-objects-in-state) +* [state 内の配列を更新する方法](/learn/updating-arrays-in-state) -## Responding to events {/*responding-to-events*/} +## イベント対応 {/*responding-to-events*/} -React lets you add event handlers to your JSX. Event handlers are your own functions that will be triggered in response to user interactions like clicking, hovering, focusing on form inputs, and so on. +React では、JSX にイベントハンドラを追加することができます。イベントハンドラは、クリック、ホバー、フォーム入力へのフォーカスなどのユーザインタラクションに応答して起動する独自の関数です。 -Built-in components like `