Skip to content
weftGitHub

Diagnostics

W005

state(prop): React's useState(prop) bug, the box never follows the prop.

Fix: state.linked(() => prop), or untrack for a one-time copy.

Status in weft@0.1.0: reported, suggested edit.

Triggers it:

tsx
import { state } from '@weft-js/core'export function A({ v }: any) { const s = state(v); return <p>{s.value}</p> }

More: weft docs props.