public static VisualElement CreateInstance(string type, IComponentProps props, VisualElement rootContainer)
        {
            var component = ComponentMapper.CreateComponent(type);

            ComponentMapper.ApplyProps(type, component, props);

            return(component);
        }
 public static bool FinalizeInitialChildren(
     VisualElement parentInstance,
     string type,
     IComponentProps props,
     VisualElement rootContainer,
     HostContext hostContext)
 {
     return(true);
 }
 public static IComponentProps PrepareUpdate(
     VisualElement instance,
     string type,
     IComponentProps oldProps,
     IComponentProps newProps,
     VisualElement rootContainer,
     HostContext hostContext)
 {
     return(ComponentMapper.MakePropsDiff(type, oldProps, newProps));
 }
Ejemplo n.º 4
0
        public static bool CommitUpdate(
            VisualElement instance,
            IComponentProps updatePayload,
            string type,
            IComponentProps oldProps,
            IComponentProps newProps)
        {
            ComponentMapper.ApplyProps(type, instance, updatePayload);

            return(true);
        }
Ejemplo n.º 5
0
 public static void CommitMount(VisualElement instance, string type, IComponentProps props)
 {
 }
 public static bool ShouldDeprioritizeSubtree(string type, IComponentProps props)
 {
     return(false);
 }
 public static bool ShouldSetTextContent(string type, IComponentProps props)
 {
     return(type == "text");
 }