Composables
sifferhans opened this issue · comments
Sigve Hansen commented
Use composables for core component logic.
This has the potential to greatly reduce the complexity of the component files, as we separate logic from UI.
<script setup lang="ts">
import { useButton } from '@sigveh/basic-ui'
const { bindings, ref } = useButton()
</script>
<template>
<button :ref="ref" v-bind="bindings">Click me</button>
</template>