summaryrefslogtreecommitdiffstats
path: root/webapp/stores/redux_store.jsx
blob: de5099d27604aacabb875c9e45ed35eed3d3c715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

// This is a temporary store while we are transitioning from Flux to Redux. This file exports
// the configured Redux store for use by actions and selectors.

import configureStore from 'store';
const store = configureStore();

export function bindActionToRedux(action, ...args) {
    return async () => {
        await action(...args)(store.dispatch, store.getState);
    };
}

window.store = store;

export default store;