FieldArray in typescript #3568
Answered
by
sebastiansas1
othmanekahtal
asked this question in
Show and tell
|
Hi 👋 'FieldArray' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> | Component<FieldArrayConfig, any, any> | null' is not a valid JSX element.
Type 'Component<FieldArrayConfig, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<FieldArrayConfig, any, any>' is not assignable to type 'ElementClass'.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type '../node_modules/@types/hoist-non-react-statics/node_modules/@types/react/index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.``` |
Answered by
sebastiansas1
Feb 27, 2024
Replies: 3 comments 1 reply
|
React 18 types maybe? |
1 reply
|
For anyone still trying to fix this error, try this: Then use |
0 replies
Answer selected by
othmanekahtal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

For anyone still trying to fix this error, try this:
Then use
FormikFieldArrayas the compoment.