Use a Switch Statement to Handle Multiple Actions code error

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
    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:

Make sure you aren’t comparing with defaultState. authReducer should compare with types of actions, which is conveniently received as a 2nd argument.