Moezalez Moezalez - 28 days ago 5x
React JSX Question

How to flow type a Component?

type Props = {
Component: ???
const AnotherComp = ({Component}: Props) => (
<Component />

What's the proper way to add a prop for the component?


The type that you're looking for is called ReactClass. The type for any component would be ReactClass<any>.

Check out this similar question: What type to use for things React can render?