I have been using axios cancelToken for sometime when it comes to making api calls, let's say user wants to search for an item, anytime the user types, a request is made and using axios cancel Token, it cancels the previous request and makes a new call each time a user types. But I recently found the debounce function in Javascript which also does similar thing but instead of canceling, it rather delays the request the user makes to the api.. So I want to know when and where to use axios cancel Token and also when to use the debounce function. Which is better?