Can someone help me render react components with variable names? For example, I have a component that imports 3 other components and I want to loop through the array of components and render them. Very rough pseudocode:
import component1 from '...';
import component2 from '...';
import component3 from '...';
const component_list = ['component1', 'component2', 'component3']
renderComponents() {
return this.component_list.map((component) {
<div>
<{component} />
</div>
});
}