-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Status: ProposalRequest for commentsRequest for commentshelp wantedExtra attention is neededExtra attention is needed
Description
Reduxのアーキテクチャ
URL: https://github.com/rackt/redux
どう書ける?
import { createStore, combineReducers, applyMiddleware } from 'redux';
// applyMiddleware takes createStore() and returns
// a function with a compatible API.
let createStoreWithMiddleware = applyMiddleware(logger, crashReporter)(createStore);
// Use it like you would use createStore()
let todoApp = combineReducers(reducers);
let store = createStoreWithMiddleware(todoApp);
どういう仕組み?
- 高階関数をapplyしている
- http://rackt.github.io/redux/docs/advanced/Middleware.html
- その機構のコードへのリンク
- 同様の仕組みをDispatcherベース(Flux向け)で書く
- その仕組みやプラグインについてドキュメントへのリンク
どういう事に向いてる?
- アスペクト的に前後に処理を挟めるためログ
- 値自体は直接操作するわけではないが、受取るデータは変換できる
どういう事に向いていない?
- 変換の仕組み上書き換え等を行うプラグインを扱いにくい 等
この仕組みを使ってるもの
- Connectに似ている
チェックリスト
- どう書ける?
- どういう仕組み?
- どういう用途に向いている?
- どういう用途に向いていない?
- この仕組みを使っているもの
- 実装してみよう
- エコシステム
- 目次を追加
Metadata
Metadata
Assignees
Labels
Status: ProposalRequest for commentsRequest for commentshelp wantedExtra attention is neededExtra attention is needed