A composable is a reusable function that encapsulates stateful logic using the Composition API. By convention it's named useXxx and returns reactive state plus functions — letting you share logic across components without mixins or repetition.
Writing a composable
{ ref, computed } ;
() {
count = (initial);
double = ( count. * );
() { count.++; }
() { count. = initial; }
{ count, double, increment, reset };
}
