TanStackT
TanStack10mo ago
1 reply
wispy-olive

IsSubmitting not working nextjs server action submit

Hey Everyone,

I used the tanstack form nextjs example but the issubmitting is not working.

<form.Subscribe
selector={(formState) => [formState.canSubmit, formState.isSubmitting]}
>
{([canSubmit, isSubmitting]) => (
<button type="submit" disabled={!canSubmit}>
{isSubmitting ? "..." : "Submit"}
</button>
)}
</form.Subscribe>

It just always shows Submit never ...

I could also publish a repo as example if it helps but it is really just the nextjs example: https://tanstack.com/form/latest/docs/framework/react/examples/next-server-actions?path=examples%2Freact%2Fnext-server-actions%2Fsrc%2Fapp%2Fclient-component.tsx
An example showing how to implement Next Server Actions in React using TanStack Form.
React TanStack Form Next Server Actions Example | TanStack Form Docs
Was this page helpful?