Skip to content

Instantly share code, notes, and snippets.

Created November 17, 2016 08:01
Show Gist options
  • Save anonymous/ba4cee86c538095df68b2de8b0fadab8 to your computer and use it in GitHub Desktop.
Save anonymous/ba4cee86c538095df68b2de8b0fadab8 to your computer and use it in GitHub Desktop.
import {updateItemReducer} from './todo/reducerToDo';
import {manageUser} from './user/userReducer';
import {createStore, combineReducers } from 'redux';
import * as Actions from './user/userActions'
const reducers = combineReducers ({
updateItemReducer,
manageUser
})
export const myMiddleWare = store => next => Actions {
console.log("I am middleware")
}
const middleware = redux.applyMiddleware(myMiddleWare);
export const store = createStore(reducers,middleware);
// Module build failed: SyntaxError: Unexpected token, expected ; (11:53)
// 9 | })
// 10 |
// > 11 | export const myMiddleWare = store => next => Actions {
// | ^
// 12 | console.log("I am middleware")
// 13 | }
// 14 | const middleware = redux.applyMiddleware(myMiddleWare);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment