Diagnostics

STORE_WRITE_THROUGH_LOADING

Store setter wrote inside another store still loading its first answer; the nested write is dropped.


What you saw

  • Kind: write
  • Severity: warn (code that works but is structurally wrong or expensive)

The console report opens with [STORE_WRITE_THROUGH_LOADING] and the message, then an in line naming the owners that enclose the subject, root first, and an at line with the source location when the code was compiled with one. In a captured artifact the same finding is an event with code: "STORE_WRITE_THROUGH_LOADING", ownerPath, and loc. Diagnostics explains each line.


Why it fires

A store setter wrote inside a value that is another store still loading its first answer (setOuter(s => { s.child.x = 9 }), where outer's derive returned { child: inner }). The nested write needs that store's contents and they do not exist yet (its seed is never shown), so the write is dropped, as a write to a loading store is replaced by its first answer; the outer store keeps following the inner one.


How to fix it

Repair: write after the inner store loads, or replace the whole value, setOuter(s => { s.child = { ...next } }). data.property names the key holding the loading store. Production drops the write the same way, without the warning.


In tests

captureArtifact from @solidjs/diagnostics runs a scenario with the diagnostics channel open and returns the events it saw. expectNoDiagnostics(artifact) fails while STORE_WRITE_THROUGH_LOADING is among them, with the events as evidence; after the fix, the code is gone from artifact.diagnostics. Check for regressions in tests shows the loop and the Vitest matcher form.


Learn more

Last updated: 11/16/26, 6:55 AMEdit this pageReport an issue with this page