Skip to content
weftGitHub

Diagnostics

W056

watch that copies a live value (a @weft-js/core/browser value, .live()) into state.

Fix: Read live.value directly, or derived(() => live.value).

Status in weft@0.1.0: reported.

Triggers it:

tsx
import { state, watch } from '@weft-js/core'import { online } from '@weft-js/core/browser'export function A() { const isOnline = online(); const up = state(true); watch(() => isOnline.value, v => { up.value = v }); return <p>{up.value}</p> }

More: weft docs browser.