RMD030 — State written during [INSPECT]()
[INSPECT]() {
this.scans = this.scans + 1; // reported
return { scans: this.scans };
}
[INSPECT]() describes an instance. It does
not change one.
The panel calls it on every commit while it is open on the components tab, so a write here closes a circle: the write schedules a render, the render commits, the commit pings the panel, and the panel asks again. Two things go wrong, and the second is the worse one:
- the app does more work to reach the same screen;
- the values on screen stop being the values the app had — handed to the one reader least able to doubt them, at exactly the moment they are trying to work out what is wrong.
Read fields, derive values, return. If something has to be computed, compute it into a local. If
something has to be cached, cache it in a plain field rather than @state — which is what
Form and Mutation already do, holding what their version counter stands for:
[INSPECT]() {
return { values: this.current, errors: [...this.issues], isDirty: this.isDirty };
}
A write that changes nothing is reported too. It schedules no render, so there is no loop — but the
method's contract is to read, and the same stance applies as in a
@compute. This is the third of that family:
RMD001 during render(), RMD018 during a @compute, and
this one during a describe.
Next
- All diagnostics — every code the framework can report.
- Checking your app — the faults proved from the source, before anything runs.