Hawk/src/js/store.js

20 lines
485 B
JavaScript
Raw Normal View History

import { createStore } from 'redux';
import reducers from 'reducers/all';
import changedir from 'actions/changedir';
import Immutable from 'immutable';
2015-09-03 10:32:46 +00:00
import menus from './menus';
import dialogs from './dialogs';
2015-09-03 10:32:46 +00:00
const DEFAULT = new Immutable.Map(Object.assign({
dir: '',
}, dialogs, menus));
let store = createStore(reducers, DEFAULT);
2015-09-03 10:32:46 +00:00
store.dispatch(changedir(DEFAULT.get('dir')));
export function bind(action) {
return () => store.dispatch(action);
}
export default store;