function categories(state = initailCategories, action){
  switch (action.type) {
    case GET_CATEGORIES :
      const { categories } = action    
      return {
        ...state,
        ...categories
      }  
    default: return state
  }
}
/**
 * @description Reducer for category
 * @param {Object} state - Contains information about the categories
 * @param {Object} action - Contains information about what action is executed
 */
@description Reducer for category
@param {Object} state - Contains information about the categories
@param {Object} action - Contains information about what action is executed
@description Reducer for category @param { Object } state - Contains information about the categories @param { Object } action - Contains information about what action is executed
function categories(state = initailCategories, action){
  switch (action.type) {
    case GET_CATEGORIES :
      const { categories } = action    
      return {
        ...state,
        ...categories
      }  
    default: return state
  }
}
function categories ( state = initailCategories , action ) { switch ( action . type ) { case GET_CATEGORIES : const { categories } = action return { ... state , ... categories } default : return state } }
@description Reducer for category
 @param {Object} state - Contains information about the categories
 @param {Object} action - Contains information about what action is executed
@description Reducer for category @param { Object } state - Contains information about the categories @param { Object } action - Contains information about what action is executed