I have a factory where I want to spawn react components. For now I have Load and Migrate. Passing the imported name directly works fine:
...
return React.createElement(Migrate, {
node: node,
diagramEngine: diagramEngine
});
But I would like to insert the name dynamically.
...
var ElementToCreate = node.state.manipulator.name;
return React.createElement(ElementToCreate, {
node: node,
diagramEngine: diagramEngine
});
But this blows up with error message:
Warning: Unknown props
node,diagramEngineon tag. Remove these props from the element
Passing raw strings "Migrate" or "Load" also fails. Following the tips here did not help me identify the issue. Any ideas?