Open History to see the last commit
1import { useFormContext } from '../AppForm'
2β
3export function SubmitButton({ label }: { label: string }) {
4 const form = useFormContext()
5 return (
6 <form.Subscribe selector={(state) => state.isSubmitting}>
7 {(isSubmitting) => (
8 <button type="submit" disabled={isSubmitting}>
9 {label}
10 </button>
11 )}
12 </form.Subscribe>
13 )
14}