MARKLESS_SPREAD_STATIC_SNAPSHOT
Spread attributes render once: a Markless compiler warning.
Warning from the compiler, while it builds your .tsrx files.
What happened
Markless prints the message, the reason, and a suggestion:
MARKLESS_SPREAD_STATIC_SNAPSHOT: {...<spreadSource>} copies attributes during initial render. When <spreadSource> changes later, these attributes do not update.
The compiler plans DOM-update records for graph-backed attributes it can see; a spread hides which attributes exist, so no update records are planned for it.
Bind attributes that change individually, such as <div id={menu.id} data-open={menu.open} />, and keep the spread only for initial attributes.
Words in angle brackets change from case to case.
How to fix it
Start with the suggestion in the message above.
If you accept the warning on purpose, put this comment on the line above it:
// markless-allow MARKLESS_SPREAD_STATIC_SNAPSHOT: the reason you accept it
This page has no guide yet. Help write it.
Where it comes from
@markless/compiler raises this code. Source:
Read how to read a Markless error, or go back to all error codes.
