GT2/GT2-iOS/node_modules/xdl/build/state/index.js.flow

36 lines
741 B
Plaintext
Raw Normal View History

2018-02-12 17:26:06 +00:00
/**
* @flow
*/
import { connect as reduxConnect } from 'react-redux';
import * as notifications from './reducers/notifications';
import * as projects from './reducers/projects';
import { createXDLStore } from './store';
// Reducers
export const reducers = {
notifications: notifications.reducer,
projects: projects.reducer,
};
export const store = createXDLStore(reducers);
// Actions
export const actions = {
notifications: notifications.actions,
projects: projects.actions,
};
export const connect = (
mapStateToProps: any,
mapDispatchToProps: any,
mergeProps: any,
options: any = {}
) => {
return reduxConnect(mapStateToProps, mapDispatchToProps, mergeProps, {
storeKey: 'xdlStore',
...options,
});
};