My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How can I stop processing a function before it completes?

Rahul Bisht's photo
Rahul Bisht
·Apr 10, 2018

I've two tabs on a webpage. When a user switches the tab, it displays its respective layout and it performs some tasks. If a user switches the tab back to one then it becomes slow and it is very visible on the webpage.

So, how can I stop any processing of the respective tab if a user switches tab very quickly?