Courses

Vue 3 Composition API - Composition API in Action - Refactoring for a More Versatile Composable

In this lesson, we create a useResource composable to handle the fetching logic and state for both posts and users.

Along the way, we get to see the flexibility composables provide when it comes to renaming data and functions to prevent naming collisions across composables.

Finally, we examine the ability to pass parameters to composables in order to make them even more versatile.