Describe the bug#
Following up with a discussion #2051, The component returned by withForm does not keep properties passed to it reactive.
Steps to reproduce#
Create a simple form component:
export const InstituteForm = withForm({
defaultValues: {
name: '',
},
props: {
status: { type: 'idle' },
isSubmitting: false,
},
render(props) {
createEffect(() => {
console.log('Props', props.status, props.isSubmitting);
});
return (<div>Form Component</div>);
},
});
When this component is used, the status and isSubmitting are not reactive and the createEffect() never runs.
<InstituteForm
form={form}
status={status()}
isSubmitting={isSubmitting()}
/>
Expected behavior#
In the shared example, the status and isSubmitting should be reactive.
How often does this bug happen?#
Every time
Platform#
It is reproducible as of:
@tanstack/solid-form@1.28.3
typescript@5.9.3