QuizNot attempted
Passing a component as a prop
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
React.ComponentType<ProfileProps>
ComponentType<P>is a function or class component that accepts propsP, so the route can render it as<Component {...props} />and TS checks the props you pass.- Not React.ReactNode: that is already-rendered output (
<Profile />), which you can't give new props. - Not React.JSX.Element: same, an element rather than a component.
- Not () => void: a component returns something renderable and takes props.