Error codesState

The markup writes to state

MARKLESS_STATE_WRITE_IN_TEMPLATEerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_STATE_WRITE_IN_TEMPLATE: Cannot write state inside a template expression
DOM updates are the only effects in the demand-driven graph; a write inside a branch test creates a self-waking cycle that cannot resume.
Render the value directly and move the mutation to an event handler or another explicit write site.
https://markless.dev/errors/MARKLESS_STATE_WRITE_IN_TEMPLATE

Why

Expressions in markup only read values. This one also writes to state, and the write wakes the same expression again.

Fix

Render the value directly. Move the write into an event handler.

Where Markless raises it

All error codes