Skip to content
weftGitHub

Diagnostics

W018

const x = untrack(() => …reactive…) in a component body that only the JSX reads: it renders the setup-time value and never updates.

Fix: derived(() => …) and render x.value; untrack only for a value meant to stay fixed.

Status in weft@0.1.0: reported, suggested edit.

Triggers it:

tsx
import { untrack, type State } from '@weft-js/core'export function A({ id, live }: { id: string; live: State<Record<string, number>> }) { const n = untrack(() => live.get(id)); return <p>{n}</p> }