I have a issue with type declaration for function parameters. Please see the code below,
const FunctionalComponent = ({propA,propB}: FunctionalComponentProps): JSX.Element => {
return
}
Now I want to pass the FunctionalComponent as a parameter to another function. How should I declare the parameter type?
const Foo = (
para1: string,
TheFunctionalComponent: ??? // Tried React.FC<any>, it work, want to provide more strict such as React.FC<FunctionalComponentProps>, this way it does not work. Is the React.FC<any> the only way?
)