Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

SubscribeButton.vue

16 lines360 Bytes

1<script setup lang="ts">
2import { useFormContext } from '../hooks/form.ts'
3​
4defineProps<{ label: string }>()
5​
6const form = useFormContext()
7</script>
8​
9<template>
10 <form.Subscribe
11 :selector="(state) => state.isSubmitting"
12 v-slot="isSubmitting"
13 >
14 <button type="submit" :disabled="isSubmitting">{{ label }}</button>
15 </form.Subscribe>
16</template>