From 4984b9019a51bfe624c459d8a2d291c8bfcc341e Mon Sep 17 00:00:00 2001 From: Juraj Kirchheim Date: Thu, 27 Oct 2022 08:39:27 +0200 Subject: [PATCH] Fixes #30. --- src/coconut/react/View.macro.hx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/coconut/react/View.macro.hx b/src/coconut/react/View.macro.hx index 525c95c..74821ca 100644 --- a/src/coconut/react/View.macro.hx +++ b/src/coconut/react/View.macro.hx @@ -156,14 +156,9 @@ class View { #if react_devtools @:keep @:noCompletion var __stateMap:{}; #end - static public function fromHxx(hxxMeta:$hxxMeta, attributes:$attributes):coconut.ui.RenderResult - return { - $magic: coconut.react.View.TRE, - type: $reactType, - props: attributes, - key: hxxMeta.key, - ref: if (!cast hxxMeta.ref) null else hxxMeta.ref, - } + static public function fromHxx(attributes:$attributes & $hxxMeta):coconut.ui.RenderResult + return react.React.createElement($reactType, attributes); + }); parametrize(added[added.length - 1], cls);