im looking to generate components based on input array of objects lets say:
let components = [
{ Hero: { componentData: {} },
{ AnotherComponent: { componentData: {} }
]
where 'Hero' and 'AnotherComponent' are component names that are used in import. all possible components are imported - i know in advance all components that could be used, i just dont know which will be used and in what order.
then i would like to do something like below pseudo-code as i know Object.keys(components)[0] is a string not a component class
{#each components as component}
<svelte:component this={Object.keys(components)[0]} data={component.componentData} />
{/each}
maybe there is a way to get a list of all imported components in svelte so i could map string names to components classes?