I have a following config as JSON
var componentConfig = {
content: { type: "ContentContent", data: "content"},
new_content: { type: "ContentFormContent", data: "content"}
}
In react rendercomponent, is it possible to pass the component name dynamically to react render.
for e.g in this rendercomponent instead of putting the ContentFormContent directly is it possible to pass the data from json config and i can loop or something.
React.renderComponent(<ContentFormContent data={[componentConfig.new_content.data]} />, body);
SO i will have a list of pages in json config and based on the selection of particular nav i will render the component based on its 'type' from the json file