From b74f54cbaf0751fd274da27e66465fd0ab77e0e8 Mon Sep 17 00:00:00 2001 From: kawamataryou Date: Mon, 24 Feb 2020 07:28:45 +0900 Subject: [PATCH 1/3] Transrate docs/docs/actions --- docs/docs/actions.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/docs/actions.md b/docs/docs/actions.md index 28d9fc5d3..f7648a16f 100644 --- a/docs/docs/actions.md +++ b/docs/docs/actions.md @@ -1,18 +1,19 @@ --- -title: Actions -description: Documentation on actions and how they help you manipulate state within Gatsby +title: アクション +description: Gatsbyの状態管理に役立つアクションのドキュメント jsdoc: - "gatsby/src/redux/actions/public.js" - "gatsby/src/redux/actions/restricted.js" contentsHeading: Functions --- -Gatsby uses [Redux](http://redux.js.org) internally to manage state. When you implement a Gatsby API, you are passed a collection of actions (equivalent to actions bound with [bindActionCreators](https://redux.js.org/api/bindactioncreators/) in Redux) which you can use to manipulate state on your site. +Gatsby は [Redux](http://redux.js.org) を内部的に使用して状態を管理しています。 +あなたのサイトで Gatsby API を実装するとアクションのコレクション(Redux の [bindActionCreators](https://redux.js.org/api/bindactioncreators/) てバインドされるアクションと同等)が渡され、状態管理に使用できます。 -The object `actions` contains the functions and these can be individually extracted by using ES6 object destructuring. +`actions` のオブジェクトに含まれる各関数は、ES6 のオブジェクトの分割代入で個別に抽出できます。 ```javascript -// For function createNodeField +// createNodeField 関数の場合 exports.onCreateNode = ({ node, getNode, actions }) => { const { createNodeField } = actions } From 65eb68166d3d9a96f3821ab090f2d2436648aace Mon Sep 17 00:00:00 2001 From: ryo Date: Mon, 24 Feb 2020 14:39:05 +0900 Subject: [PATCH 2/3] Update docs/docs/actions.md Co-Authored-By: Yasuaki Uechi --- docs/docs/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/actions.md b/docs/docs/actions.md index f7648a16f..fbcabc719 100644 --- a/docs/docs/actions.md +++ b/docs/docs/actions.md @@ -8,7 +8,7 @@ contentsHeading: Functions --- Gatsby は [Redux](http://redux.js.org) を内部的に使用して状態を管理しています。 -あなたのサイトで Gatsby API を実装するとアクションのコレクション(Redux の [bindActionCreators](https://redux.js.org/api/bindactioncreators/) てバインドされるアクションと同等)が渡され、状態管理に使用できます。 +あなたのサイトで Gatsby API を実装するとアクションのコレクション(Redux の [bindActionCreators](https://redux.js.org/api/bindactioncreators/) でバインドされるアクションと同等)が渡され、状態管理に使用できます。 `actions` のオブジェクトに含まれる各関数は、ES6 のオブジェクトの分割代入で個別に抽出できます。 From 5cc62d251e432ae9731903d9d001c0be1231f7ec Mon Sep 17 00:00:00 2001 From: kawamataryou Date: Tue, 25 Feb 2020 15:06:34 +0900 Subject: [PATCH 3/3] remove new line --- docs/docs/actions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs/actions.md b/docs/docs/actions.md index fbcabc719..504f04f61 100644 --- a/docs/docs/actions.md +++ b/docs/docs/actions.md @@ -7,8 +7,7 @@ jsdoc: contentsHeading: Functions --- -Gatsby は [Redux](http://redux.js.org) を内部的に使用して状態を管理しています。 -あなたのサイトで Gatsby API を実装するとアクションのコレクション(Redux の [bindActionCreators](https://redux.js.org/api/bindactioncreators/) でバインドされるアクションと同等)が渡され、状態管理に使用できます。 +Gatsby は [Redux](http://redux.js.org) を内部的に使用して状態を管理しています。あなたのサイトで Gatsby API を実装するとアクションのコレクション(Redux の [bindActionCreators](https://redux.js.org/api/bindactioncreators/) でバインドされるアクションと同等)が渡され、状態管理に使用できます。 `actions` のオブジェクトに含まれる各関数は、ES6 のオブジェクトの分割代入で個別に抽出できます。