The debounce seems to be working strangely. Issues observed: 1. Tiggering the API multiple times. 2. It is not calling APi at beginning but is calling it at the end of the debounce time.