跳到主要内容

Composition API FAQ

What is Composition API?

It is an umbrella term that covers the following APIs

Why Composition API?

Better Logic Reuse

The primary advantage of Composition API is that it enables clean, efficient logic reuse in the form of Composable functions.

https://vueuse.org/

More Flexible Code Organization

code related to the same logical concern can now be grouped together

Better Type Inference

Composition API utilizes mostly plain variables and functions, which are naturally type friendly