Error codesComponents

A component returns markup from two places

MARKLESS_COMPONENT_ROOT_CONDITIONALerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_COMPONENT_ROOT_CONDITIONAL: <componentName> has a second template return, so the public render module cannot choose one component root without deleting statement flow.
Initial render executes component bodies, but resume needs one planned root with stable locators. Multiple or conditional template returns need branch records before they can render.
Use a single root with @if/@else inside it, or return null before the one root for a guard clause.
https://markless.dev/errors/MARKLESS_COMPONENT_ROOT_CONDITIONAL

Words in angle brackets change from case to case.

Why

A component needs one root. This one has a second place that returns markup.

Fix

Keep one root and put @if and @else inside it. For an early exit, return null before that root.

Where Markless raises it

All error codes