Sphereとともに

scalaとかplayframeworkとか。技術ブログにしたいなと。環境は Windows7x64, mac です。たまに声優さん情報が混ざります。最近ちょっとClojure触りました。

Redux 超適当訳

Dispatching Function

A dispatching function (or simply dispatch function) is a function that accepts an action or an async action; it then may or may not dispatch one or more actions to the store.

ディスパッチング関数は action か 非同期 actionを受け入れる関数です。 それは、その後、またはストアに1つ以上のアクションをディスパッチしてもしなくてもよいです。(google翻訳

We must distinguish between dispatching functions in general and the base dispatch function provided by the store instance without any middleware.

一般的なディスパッチ関数とミドルウェアなしのストアインスタンスによって提供される基礎のディスパッチ関数と区別しなければならない。

The base dispatch function always synchronously sends an action to the store’s reducer, along with the previous state returned by the store, to calculate a new state. It expects actions to be plain objects ready to be consumed by the reducer.

基礎のディスパッチ関数はいつもアクションに同期的にストアのリデューサーにアクションを送信します。 ストアによって返される前の状態と共に、新しい状態を計算します。これは、アクションが減速によって消費されるプレーンなオブジェクトは準備ができていることを想定しています。

Middleware wraps the base dispatch function. It allows the dispatch function to handle async actions in addition to actions. Middleware may transform, delay, ignore, or otherwise interpret actions or async actions before passing them to the next middleware. See below for more information.

ミドルウェアは基礎のディスパッチ関数をラップします。 ディスパッチ関数は同期処理も非同期処理も行えます。 ミドルウェアは次のミドルウェアに渡す前に変換、遅延、無視、アクションを解釈、アクションを同期する。

入門 React ―コンポーネントベースのWebフロントエンド開発

入門 React ―コンポーネントベースのWebフロントエンド開発