From 2bf8b06323a42960dbb7f76caa06a28b3e9fde3f Mon Sep 17 00:00:00 2001 From: hxp888888 <32638462+LemonAppleMo@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:21:03 +0800 Subject: [PATCH 1/2] Clean up Component function syntax in untrack.mdx Removed unnecessary closing braces from Component functions. --- src/routes/reference/reactive-utilities/untrack.mdx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/routes/reference/reactive-utilities/untrack.mdx b/src/routes/reference/reactive-utilities/untrack.mdx index e33e99d4e..7eebf7f0d 100644 --- a/src/routes/reference/reactive-utilities/untrack.mdx +++ b/src/routes/reference/reactive-utilities/untrack.mdx @@ -25,7 +25,6 @@ export function Component(props) { const value = untrack(() => props.value) return
{value}
- } } ``` @@ -41,7 +40,6 @@ export function Component(props) { const [name, setName] = createSignal(props.initialName) return
{name()}
- } } ``` @@ -53,6 +51,5 @@ export function Component(props) { const [name, setName] = createSignal(props.defaultName) return
{name()}
- } } ``` From 2e22512c7bd07c8578ff755177d942656f8777d7 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 02:24:22 +0000 Subject: [PATCH 2/2] ci: apply automated fixes --- .../reference/reactive-utilities/untrack.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/routes/reference/reactive-utilities/untrack.mdx b/src/routes/reference/reactive-utilities/untrack.mdx index 7eebf7f0d..2b38a9383 100644 --- a/src/routes/reference/reactive-utilities/untrack.mdx +++ b/src/routes/reference/reactive-utilities/untrack.mdx @@ -19,12 +19,12 @@ description: >- Ignores tracking any of the dependencies in the executing code block and returns the value. This helper is useful when a certain `prop` will never update and thus it is ok to use it outside of the tracking scope. ```tsx title="component.tsx" -import { untrack } from "solid-js" +import { untrack } from "solid-js"; export function Component(props) { - const value = untrack(() => props.value) + const value = untrack(() => props.value); - return
{value}
+ return
{value}
; } ``` @@ -34,22 +34,22 @@ It is not necessary to manually untrack values that are suppose to serve as a de ```tsx tab title="initialValue" {5} // component.tsx -import { createSignal } from "solid-js" +import { createSignal } from "solid-js"; export function Component(props) { - const [name, setName] = createSignal(props.initialName) + const [name, setName] = createSignal(props.initialName); - return
{name()}
+ return
{name()}
; } ``` ```tsx tab title="defaultValue" {5} // component.tsx -import { createSignal } from "solid-js" +import { createSignal } from "solid-js"; export function Component(props) { - const [name, setName] = createSignal(props.defaultName) + const [name, setName] = createSignal(props.defaultName); - return
{name()}
+ return
{name()}
; } ```