Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux store

import { createStore, applyMiddleware, combineReducers } from "redux";
import thunkMiddleware from "redux-thunk";
import { composeWithDevTools } from "redux-devtools-extension";
import AuthReducer from "./reducers/AuthReducer";
const rootReducers = combineReducers({
  AuthReducer,
});
const middleware = [thunkMiddleware];
const Store = createStore(
  rootReducers,
  composeWithDevTools(applyMiddleware(...middleware))
);
export default Store;
Source by learn.nucamp.co #
 
PREVIOUS NEXT
Tagged: #redux #store
ADD COMMENT
Topic
Name
1+8 =