Skip to content
These are temporary community docs. The official docs are in progress.Help improve them
Markless
Esc
↑↓navigate↵open⌘Jpreview
On this page

MARKLESS_CHILDREN_OPAQUE

Code maps, counts, indexes, or changes children.

Error from the compiler, while it builds your .tsrx files.

What happened

You can place {children}, wrap it, or pass it on. You cannot map, count, index, or change it.

Markless prints the message, the reason, and a suggestion:

MARKLESS_CHILDREN_OPAQUE: children is an opaque template projection: place it with {children}, wrap it, or pass it through — mapping, counting, indexing, or mutating it is not supported.
The compiler owns children projection; there is no render-output array to inspect, so React-style children access would silently misbehave.
Render {children} directly or move per-item rendering to the parent.
https://markless.dev/errors/MARKLESS_CHILDREN_OPAQUE

How to fix it

Render {children} as it is. If you need markup per item, render the items in the parent.

Where it comes from

@markless/compiler raises this code. Source:

Read how to read a Markless error, or go back to all error codes.

Was this page helpful?