function posts (state = initialPosts, action) {
  switch (action.type) {
    case GET_POSTS : return getPosts (state, action)      
    case DETAIL_POST : return detailsPost (state, action)      
    case REMOVE_POST : return removePost (state, action)
    case ADD_POST : return addPost (state, action)      
    case EDIT_POST : return editPost (state, action)
    case UP_DOWN_VOTE_POST : return upDownVotePost (state, action)            
    case UPDATE_NUMBER_COMMENT : return updateNumberCommentPost (state, action)      
    case SORT : return sortPost (state, action)      
    case GET_POST_BY_CATEGORY : return getPostByCategory (state, action)      
    default : return state
  }
}
/**
 * @description Reducer for post
 * @param {Object} state - Contains information about the posts
 * @param {Object} action - Contains information about what action is executed
 */
@description Reducer for post
@param {Object} state - Contains information about the posts
@param {Object} action - Contains information about what action is executed
@description Reducer for post @param { Object } state - Contains information about the posts @param { Object } action - Contains information about what action is executed
function posts (state = initialPosts, action) {
  switch (action.type) {
    case GET_POSTS : return getPosts (state, action)      
    case DETAIL_POST : return detailsPost (state, action)      
    case REMOVE_POST : return removePost (state, action)
    case ADD_POST : return addPost (state, action)      
    case EDIT_POST : return editPost (state, action)
    case UP_DOWN_VOTE_POST : return upDownVotePost (state, action)            
    case UPDATE_NUMBER_COMMENT : return updateNumberCommentPost (state, action)      
    case SORT : return sortPost (state, action)      
    case GET_POST_BY_CATEGORY : return getPostByCategory (state, action)      
    default : return state
  }
}
function posts ( state = initialPosts , action ) { switch ( action . type ) { case GET_POSTS : return getPosts ( state , action ) case DETAIL_POST : return detailsPost ( state , action ) case REMOVE_POST : return removePost ( state , action ) case ADD_POST : return addPost ( state , action ) case EDIT_POST : return editPost ( state , action ) case UP_DOWN_VOTE_POST : return upDownVotePost ( state , action ) case UPDATE_NUMBER_COMMENT : return updateNumberCommentPost ( state , action ) case SORT : return sortPost ( state , action ) case GET_POST_BY_CATEGORY : return getPostByCategory ( state , action ) default : return state } }
@description Reducer for post
 @param {Object} state - Contains information about the posts
 @param {Object} action - Contains information about what action is executed
@description Reducer for post @param { Object } state - Contains information about the posts @param { Object } action - Contains information about what action is executed