Redux

react-reduxを使ってみる

React Redux is the official React binding for Redux. It lets your React components read data from a Redux store, and dispatch actions to the store to update data.Reactコンポーネントが、Reduxの管理するストアからデータを読み、ストアに向けて…

Container Component & Presentational Component

react-reduxを使う際に、良しとされているコンポーネント分離の考え方。 最近ではHooksを利用するやり方も?Container Component・ReactとReduxの連携役 ・ReduxからActionやStateを受け取ってPropsとして渡す ・JSXを入れない ・ラップ用のdivを除いて、自…

Reduxメモ

Redux: Fluxの概念を拡張したstate管理ライブラリ・Store: アプリの状態(state)とロジックを保持 ・Reducer: Storeが保持する状態を変化させる関数 ・Action: 状態変化を起こすメッセージオブジェクト補足) ・FluxにはDispatcherの概念があるが、こちらに…

Developer Tools for React & Redux

マストで入れるやつ👨‍🌾chrome.google.comあとはReactタブ選んで左側のターゲットアイコン使って、調べたいエレメントをクリック👆 Redux用はこっち chrome.google.com

React & Redux でとりあえず動くものを用意

npm 5.2 からcreate-react-appが標準で使える $ npx create-react-app <app-name> Redux インストール $ npm i react-redux redux</app-name>