I'm trying to create a reducer in react with the code below, but I keep getting this error in the console:
Uncaught SyntaxError: Unexpected token export
const INIT_STATE = [];
export default (state = INIT_STATE, action) {
switch(action.type) {
default: state
}
}
I'm still trying to figure my way around redux and don't know exactly how to solve this error.
functionkeyword - Bergi