mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Redux store is not a singleton anymore (-> bug fixes)
This commit is contained in:
15
app/javascript/helpers/createStore.ts
Normal file
15
app/javascript/helpers/createStore.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import thunkMiddleware from 'redux-thunk';
|
||||
|
||||
import rootReducer from '../reducers/rootReducer';
|
||||
|
||||
const createStoreHelper = () => (
|
||||
createStore(
|
||||
rootReducer,
|
||||
applyMiddleware(
|
||||
thunkMiddleware,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
export default createStoreHelper;
|
||||
Reference in New Issue
Block a user