Open
Description
Describe the bug
The example provided on the documentation
The props provided by the children() snippet are not reactive. I was trying to debug the example and see if the canSubmit & isSubmitting flags are changing
{#snippet children(state)}
<button type="submit" disabled={!state.canSubmit}>
{state.isSubmitting ? '...' : 'Submit'} // Text never changes after submission
</button>
{/snippet}
The text on the button never changes, but a separate (@debug state.isSubmitting}
indeed shows the value is changing but is not re-rendered.
Using a separately declared variable to track the submission with $state() on top level works as expected.
Your minimal, reproducible example
N/A
Steps to reproduce
Follow the example on the documentation
Expected behavior
The state variables must be reactive so it can be re-rendered
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
Mozilla Firefox 139.0b8
TanStack Form adapter
None
TanStack Form version
@tanstack/svelte-form: 1.11.1
TypeScript version
5.8.3
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels