diff --git a/src/routes/reference/reactive-utilities/untrack.mdx b/src/routes/reference/reactive-utilities/untrack.mdx index 2b38a9383..9caf6c3a0 100644 --- a/src/routes/reference/reactive-utilities/untrack.mdx +++ b/src/routes/reference/reactive-utilities/untrack.mdx @@ -18,13 +18,11 @@ 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" +```tsx title="component.tsx" {4} import { untrack } from "solid-js"; export function Component(props) { - const value = untrack(() => props.value); - - return
{value}
; + return
{untrack(() => props.value)}
; } ```