function clearSearch(e)  {
        e.preventDefault();
        dispatch({type: CLEAR_SEARCH});
        setSearch("");
    }
// clears the search input field and returns to the initial state
clears the search input field and returns to the initial state
clears the search input field and returns to the initial state
function clearSearch(e)  {
        e.preventDefault();
        dispatch({type: CLEAR_SEARCH});
        setSearch("");
    }
function clearSearch ( e ) { e . preventDefault ( ) ; dispatch ( { type : CLEAR_SEARCH } ) ; setSearch ( "" ) ; }
clears the search input field and returns to the initial state
clears the search input field and returns to the initial state