@ngdangtu-vn
Posted
There is a room to improve in fetching API.When I madly click on the rolling button, it will call the same amount API as much as I clicked. In this case, I think it's ok since API is simple. But it is not a good practice to do it in any production work. To deal with this problem, you can go as simple as I did (prefer my work) or try to apply debouncing method (this is way better than mine).
Marked as helpful
@Nipaaaa1
Posted
@ngdangtu-vn Ah, I remember reading that the API cached every 2 seconds, so it's practically useless to make request under that time span. I'll try using debouncing method to fix this, thanks!