mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
Still working on Auth State
This commit is contained in:
27
twistter-frontend/src/redux/store.js
Normal file
27
twistter-frontend/src/redux/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { createStore, combineReducers, applyMiddleware, compose } from "redux";
|
||||
import thunk from "redux-thunk";
|
||||
|
||||
import userReducer from "./reducers/userReducer";
|
||||
import dataReducer from "./reducers/dataReducer";
|
||||
import uiReducer from "./reducers/uiReducer";
|
||||
|
||||
const initialState = {};
|
||||
|
||||
const middleWare = [thunk];
|
||||
|
||||
const reducers = combineReducers({
|
||||
user: userReducer,
|
||||
data: dataReducer,
|
||||
UI: uiReducer
|
||||
});
|
||||
|
||||
const store = createStore(
|
||||
reducers,
|
||||
initialState,
|
||||
compose(
|
||||
applyMiddleware(...middleWare),
|
||||
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
||||
)
|
||||
);
|
||||
|
||||
export default store;
|
||||
Reference in New Issue
Block a user