If you know how to fix the issue, make a pull request instead.
const ExampleComponent: FC<{}> = () => {
// some data example
const data = [{ name: '123' }, { name: '321' }];
// return React Elements array
return data.map(t => <div key={t.name}>{t.name}</div>);
};
TS2322: Type '() => JSX.Element[]' is not assignable to type 'FC<{}>'. Type 'Element[]' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>'.
If you know how to fix the issue, make a pull request instead.
@types/react(version 16.9.19) package and had problems.Definitions by:inindex.d.ts) so they can respond.Simple example code:
Throws an error: