diff options
Diffstat (limited to 'webapp/stores/redux_store.jsx')
-rw-r--r-- | webapp/stores/redux_store.jsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/webapp/stores/redux_store.jsx b/webapp/stores/redux_store.jsx new file mode 100644 index 000000000..de5099d27 --- /dev/null +++ b/webapp/stores/redux_store.jsx @@ -0,0 +1,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; + |