const searchQuery = (state = {}, action) => { switch (action.type) { case "SEARCH_QUERY_SET": return (state = action.payload); case "SEARCH_QUERY_CLEAR": return (state = ""); default: return state; } }; export default searchQuery;