#author("2019-03-22T21:31:52+00:00","default:wikiadmin","wikiadmin")
-よくわからん

#contents

*勉強 [#k7e10f35]

https://qiita.com/tomzoh/items/7fabe7cb57dd96425867

https://qiita.com/takayuki-ochiai/items/d2fd896627ecf0b466be

https://qiita.com/jabba/items/5ebea8d19809a4e0f8c6

*構成要素 [#wd0f6ca8]

|Store|状態の親玉。でっかいJSONイメージ。subscribeメソッドを実装すると変更検知ができる。dispatchもstoreから行う|
|Action|名前であるTYPEと中身データのpayloadを持つ。Storeを変えたければActionをコールするところから始まる|
|ActionCreator|Actionオブジェクトを返す|
|Reducer|以前の状態とActionを組み合わせて、新しいStateを作り出す|
|Router|パスとコンポーネントを結びつける|

Router(パスへの追加)→connectでつないだコンポーネント→

*mapStateToProps mapDespatchToProps [#h361a76c]

reduxのstateをreactのpropsに変換するのと、Actionもpropsにマッピングする。


|mapStateToProps|stateを引数にとってオブジェクトを返す|
|mapDespatchToProps|dispatchを引数にとって、dispatchする複数の関数を返す|

 const { testFunction,todos } = props
 testFuctionでアクションを呼べる。上の宣言なしだとthis.props.testFunction
 todosでpropsを呼べる。this.props.todos

**Action [#i9b2fd0a]

**Reducer [#j1c94a95]

--「Reducer」は状態とアクションを受けて、新しい状態を返す関数である。
--FLUXとの相違点はReduxにはdispatcherがない。(Reducerで担う)

**State [#b7f70bec]



*ツール [#baf48dcb]

react developer tools(ReactのページでElementタブの右端に出てくる)


*参考サイト [#w96305db]

http://numb86-tech.hatenablog.com/entry/2016/11/20/124316
https://blog.mismithportfolio.com/web/20161107reactrouter

*その他 [#ud04f5d5]

-axios Promise(thenで成功、失敗処理を記載)対応のHTTPクライアント
-babel トランスパイラ
-express
-react-router-redux
-redux-actions

#counter

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS