You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two variants of the form. The second variant (I named it "pro") have the additional field "company".
I'm trying to use one component with component instead of two components and got types error at assigning a value to the Formik initialValue prop.
Property 'company' is missing in type 'ISignup' but required in type 'ISignupPro'.ts(2322)
App.tsx(9, 3): 'company' is declared here.
types.d.ts(147, 5): The expected type comes from property 'initialValues' which is declared here on type 'IntrinsicAttributes & FormikConfig<ISignupPro> & { children: () => Element; initialValues: ISignup; onSubmit: (values: ISignupPro) => void; }'
Here the link to sandbox with my project.
Full code of App.tsx below:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have two variants of the form. The second variant (I named it "pro") have the additional field "company".
I'm trying to use one component with component instead of two components and got types error at assigning a value to the Formik initialValue prop.
The error message is:
Here the link to sandbox with my project.
Full code of
App.tsx
below:I'm stuck. Please help!
Beta Was this translation helpful? Give feedback.
All reactions