Skip to content
weftGitHub

Diagnostics

W002

Writing state inside derived.

Fix: Move the write to a handler, or make the target derived.

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

Triggers it:

tsx
import { state, derived } from '@weft-js/core'export function A() { const a = state(0); const b = state(0); const d = derived(() => { b.value = a.value; return a.value }); return <p>{d.value}</p> }