Skip to content
weftGitHub

Diagnostics

W040

Early return in a component body that depends on state (runs once, never re-checked).

Fix: Branch in JSX.

Status in weft@0.1.0: not reported by this weft yet.

Triggers it:

tsx
import { state } from '@weft-js/core'export function A() { const n = state(0); if (n.value > 1) return null; return <p>{n.value}</p> }