Redux - Use a Switch Statement to Handle Multiple Actions

Tell us what’s happening:

not the doubt related to any prob sol but i am little bit confused that till before this we have learned that we should use the dispatch method to dispatch action to the store but in this program we don’t have any dispatcher right? i mean we are passing an action parameter thats it ?
please explain

Your code so far

const defaultState = {
  authenticated: false
};

const authReducer = (state = defaultState, action) => {
  // Change code below this line

  // Change code above this line
};

const store = Redux.createStore(authReducer);

const loginUser = () => {
  return {
    type: 'LOGIN'
  }
};

const logoutUser = () => {
  return {
    type: 'LOGOUT'
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36

Challenge Information:

Redux - Use a Switch Statement to Handle Multiple Actions

Hi @kranthikumar

For this step you use a switch statement. You are still returning an object, just like in the previous step.

Happy coding