#COMPOSABLE #GLOBAL #VUE3
Warning: This is just an exploration and not a best practice! To better understand the concept, read about Composables in the Vue documentation.
Composables are usually component-scoped. That means you cannot invoke the composable function in two separate components and have the composable variables in sync. However, for limited use cases, you can use the provide-inject functions in Vue 3x to create singletons of your composables accessible everywhere.
The factory function bellow is only required when you want to provide arguments to your composables before placing them in the memory of the provide function.