store のメソッドで state を取得、変更するためのイベントなどを発行していますが、store を取得する方法がいろいろあって基本的なことにやっとたどり着いたのでメモ。
1 store を作成
store.js
import { createStore } from 'redux';
import reducers from './reducers';
const store = createStore(reducers);
export default store;
2 store を使う ( state の値を変更したり、取得したり)
hoge.js
// store.js の store を取得
import store from '../../store';
store.dispatch(loadSearchLayout('users', 'User Results'));
で Action 経由 で state の値を変更とか
store.getState()
で store から state の値を取得とかできます。