MARKLESS_TEMPLATE_AS_VALUE
Markup is stored in a variable, in state, or in an array.
Error from the compiler, while it builds your .tsrx files.
What happened
In Markless, markup is not a value. You cannot store it in a variable, in state, or in an array.
Markless prints the message, the reason, and a suggestion:
MARKLESS_TEMPLATE_AS_VALUE: <siteSource> puts a template<target> where Markless needs runtime data. Templates compile into page structure with locators, not values to store, pass, or serialize.
Markless has no VDOM. Templates compile to DOM structure and resume locators, so there is no render-output object that can live in state, a computed value, a local variable, or an array.
Keep templates in the tree. Use @if/@for for conditional or repeated structure, extract child components for reusable structure, or pass nested content through children projection.
https://markless.dev/errors/MARKLESS_TEMPLATE_AS_VALUE
Words in angle brackets change from case to case.
How to fix it
Keep markup in the component tree. Use @if and @for for conditional or repeated markup. Move reusable markup into a child component, or pass it as children.
Where it comes from
@markless/compiler raises this code. Source:
Read how to read a Markless error, or go back to all error codes.
