Are the props passed to the component generated by withForm not reactivte?
#2051
Answered
by
LeCarbonator
mistyharsh
asked this question in
Q&A
-
|
I have a very simple form using export const InstituteForm = withForm({
defaultValues: {
name: '',
},
props: {
status: { type: 'idle' },
isSubmitting: false,
},
render(props) {
createEffect(() => {
console.log('Props', props.status, props.isSubmitting);
});
},
});And, it is used from another component: export function CreateInstitute() {
const [status, setStatus] = createSignal<StatusState>({ type: 'idle' });
const [isSubmitting, setIsSubmitting] = createSignal(false);
const form = useAppForm(() => ({
defaultValues: {
name: '',
} as InstituteFormModel,
onSubmit: async ({ value, formApi }) => {
setIsSubmitting(true);
setStatus({ type: 'idle' });
// Rest of the code
},
}));
return (
<InstituteForm
form={form}
status={status()}
isSubmitting={isSubmitting()}
/>
);
}The |
Beta Was this translation helpful? Give feedback.
Answered by
LeCarbonator
Feb 25, 2026
Replies: 1 comment 2 replies
-
|
Just looked at the I guess it is a bug as it doesn't use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you open an issue for this? This is likely a leftover since React was the first implementation of the function instead of solid.