Combine Multiple Reducers

Tell us what’s happening:

Your code so far


const INCREMENT = 'INCREMENT';
const DECREMENT = 'DECREMENT';

const counterReducer = (state = 0, action) => 
{
  switch(action.type) {
    case INCREMENT:
      return state + 1;
    case DECREMENT:
      return state - 1;
    default:
      return state;
  }
};

const LOGIN = 'LOGIN';
const LOGOUT = 'LOGOUT';

const authReducer = (state = {authenticated: false}, action) => 
{
  switch(action.type) {
    case LOGIN:
      return {
        authenticated: true
      }
    case LOGOUT:
      return {
        authenticated: false
      }
    default:
      return state;
  }
};



const rootReducer  = (state =, action) =>
{

Redux.combineReducers(count,auth);



};


// define the root reducer here

const store = Redux.createStore(rootReducer);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/redux/combine-multiple-reducers

i am not able to understand the key part…where to set the keys ?
can u please write the solution for me !

combineReducers(obj) will take an argument like this

obj {
    key1: reducer1,
    key2: reducer2,
    ...
}

Here, a key is a simple identifier that will refer to a specific state returned from a reducer. So, it’s like giving a variable name.
The challenge asks you to use specific key for each reducer: auth and count. So, you don’t have to do anything special with the keys.

Now, all you need is calling combineReducer() with correct argument. I think you can solve it now given how far you’ve got.