Nuxt Composables
up:: Nuxt ⚐
Composables
- Using data across components.
- Nuxi is a command line utility for working with nuxt
- you can scaffold different files
In the useCourse.js
file.
In the lesson.vue
course.
Questions: What does the computed()
mean in his code?
Composables
Cite
Any reactive logic can become a composable.
Any reactive logic from Vue, we can turn into a composable.
Three types of composables:
- Single use
- Reusable
- Generic (anything in VueUse eg.
useLocalStorage
)
Any files stored in the composable folder, are auto-imported as components to be available anywhere.