In this lesson, we take a look at useTimeout and useTimeoutFn VueUse composables for performing actions after a specified period of time. These composables can be useful for automatically hiding alerts after a delay.
While not mentioned during the lesson, it’s also worth sharing that VueUse exposes a promiseTimeout
utility function that returns a promise that resolves after the specified timeout.
Links