I'm searching for a shorter version to iterate through components from a JSON object ["Component1", "Component2", "Component3"] The Index should be the step number and the component should be outputted dynamically. Right now I have a static way, which will become very uncomfortable with more elements:
<div">
{step === 1 && <Component1 />}
{step === 2 && <Component2 />}
{step === 3 && <Component3 />}
</div>
Does anyone knows a solution to this one?
Best regards!
{ components: [Component1, Component2, Component3] }?