Tell us what’s happening:
I don’t know how to advance anymore!
Your code so far
const defaultState = {
authenticated: false
};//default action
const authReducer = (state = defaultState, action) => {
// change code below this line
switch(defaultState){
case 'LOGIN': return{ authenticated: true};
default : return {authenticated: false}
}
// change code above this line
};//change handler
const store = Redux.createStore(authReducer);
//store initiation
const loginUser = () => {
return {
type: 'LOGIN'
}
};
const logoutUser = () => {
return {
type: 'LOGOUT'
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge: