Skip to content

Redux #58

@azu

Description

@azu

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);

どういう仕組み?

どういう事に向いてる?

  • アスペクト的に前後に処理を挟めるためログ
  • 値自体は直接操作するわけではないが、受取るデータは変換できる

どういう事に向いていない?

  • 変換の仕組み上書き換え等を行うプラグインを扱いにくい 等

この仕組みを使ってるもの

  • Connectに似ている

チェックリスト

  • どう書ける?
  • どういう仕組み?
  • どういう用途に向いている?
  • どういう用途に向いていない?
  • この仕組みを使っているもの
  • 実装してみよう
  • エコシステム
  • 目次を追加

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions