I have a set of components to render for a multi step form. I'm trying to create a array with all the components then use a map() to include the components.
const stepComponents = [
<SelectCoach/>,
<SelectDate/>,
];
<Steps>
{stepComponents.map((component) => {
return <component/>
})}
</Steps>
But I get an type error,
Property 'component' does not exist on type 'JSX.IntrinsicElements'.
Any idea how to fix this?
Thanks you