I need to map my JSX component(FC) inside an object for dynamic rendering.This is what I have come up with so far:
Interface for Object
interface Mappings { EC2: { component: React.FC<{}>; name: string; description: string; };}export enum ResourcesEnum { EC2 = 'EC2', S3 = 'S3',}
The mapping object defined in the same file:
Error message:
Type 'Element' is not assignable to type 'FC<{}>'.Type 'Element' provides no match for the signature '(props: { children?: ReactNode; }, context?: any): ReactElement<any, any> | null'.
Thanks alot in advance!