Create a new React hook called useDebounce that takes a value and a delay in milliseconds. Inside, use useState and useEffect with a setTimeout that updates the debounced value, and clear the timeout in the cleanup function. Then refactor the SearchBar component to call useDebounce with a three hundred millisecond delay before hitting the slash api slash search endpoint. Run npm install lodash if we end up needing throttle as well, and add a unit test in SearchBar dot test dot tsx that mocks the fetch call.
