Composable Files

Build on our composition API knowledge by organizing code into composable files.

Using the Composition API, we can address some of the limitations of the Options API:

  • Code can be written in a more JavaScript-like way.

  • Related code can be grouped more closely for organization.

However, we have not covered how it makes our code more reusable. The Composition API aims to resolve this, along with improving our organisation even further.

Composable files

Let's look at this example:

Get hands-on with 1200+ tech skills courses.