I am using React with TypeScript in the following way:
interface MyComponentProps {
...
...
}
const MyComponent:FunctionComponent<MyComponentProps> = props => {
...
...
...
}
Now I need to define the following props type:
interface MyComponent2Props<T> {
prop1: T,
...
}
I tried to define the component:
const MyComponent2<T>:FunctionComponent<MyComponent2Props<T>> = props => {
...
...
...
}
But this is incorrect syntax.
What is the correct way to define such component?