func (n *Node) SetRootComponent(
rootComponent RootComponent,
root := n.root()
root.setValue(rootComponent)
root.setValueState(valueStateNeedSyncStructure)
if componentID, ok := n.registry.ComponentIDFor(rootComponent); ok {
root.serializedNode.GetMetadata().GetComponentAttributes().TypeId = componentID
}
return root.syncSubComponents()
}