()
| 14 | const loadingPlugin = createLoadingPlugin({}); |
| 15 | |
| 16 | const configureStore = () => { |
| 17 | const store = init({ |
| 18 | models, |
| 19 | redux: { |
| 20 | middlewares: [], |
| 21 | }, |
| 22 | plugins: [persistPlugin, loadingPlugin], |
| 23 | }); |
| 24 | |
| 25 | const persistor = getPersistor(); |
| 26 | const { dispatch } = store; |
| 27 | |
| 28 | return { persistor, store, dispatch }; |
| 29 | }; |
| 30 | |
| 31 | export default configureStore; |