Anthony Fu 7/16/2021

Async with Composition API

Read Original

This technical article addresses a common caveat in Vue.js Composition API: lifecycle hooks and reactive effects (like watch, onMounted) called after an 'await' statement in an async setup() function do not work or auto-dispose properly, leading to potential memory leaks. It explains the internal mechanism of how Vue tracks the current component instance and provides solutions to this problem.

Async with Composition API

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week