From 74301462787173f066d941ec438012800c0eec28 Mon Sep 17 00:00:00 2001 From: Justice Almanzar Date: Sun, 16 Feb 2025 16:19:25 -0500 Subject: [PATCH 1/3] untrack jsx components by default --- src/jsx.luau | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jsx.luau b/src/jsx.luau index 0bbf8f0..b4327f7 100644 --- a/src/jsx.luau +++ b/src/jsx.luau @@ -2,6 +2,7 @@ local action = require(script.Parent.action)() local changed = require(script.Parent.changed) local create = require(script.Parent.create) local tags = require(script.Parent.tags) +local untrack = require(script.Parent.untrack) type Props = { [any]: any } @@ -67,7 +68,7 @@ local function jsx(tag: string | (Props) -> any, props: Props, ...): any props.children = ... end - return tag(props) + return untrack(function() tag(props) end) end return jsx From 887aa7712a50c8eb9463ac9f1c86910a5b339c95 Mon Sep 17 00:00:00 2001 From: Justice Almanzar Date: Sun, 16 Feb 2025 16:55:45 -0500 Subject: [PATCH 2/3] lint fix? --- src/jsx.luau | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jsx.luau b/src/jsx.luau index b4327f7..a8cfd5f 100644 --- a/src/jsx.luau +++ b/src/jsx.luau @@ -68,7 +68,9 @@ local function jsx(tag: string | (Props) -> any, props: Props, ...): any props.children = ... end - return untrack(function() tag(props) end) + return untrack(function() + tag(props) + end) end return jsx From 1fe80f75b9373449964f66964d23f5bdd6a59976 Mon Sep 17 00:00:00 2001 From: Justice Almanzar Date: Sun, 16 Feb 2025 16:56:42 -0500 Subject: [PATCH 3/3] return --- src/jsx.luau | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsx.luau b/src/jsx.luau index a8cfd5f..962670e 100644 --- a/src/jsx.luau +++ b/src/jsx.luau @@ -69,7 +69,7 @@ local function jsx(tag: string | (Props) -> any, props: Props, ...): any end return untrack(function() - tag(props) + return tag(props) end) end