Skip to main content
TemplateDX expressions run inside {...} braces or JSX attributes (<If condition={...}>). The evaluator supports a deliberately limited JavaScript subset: literals, property access, a fixed set of operators, and calls to registered filters.

Literals

All five forms render in {} and work anywhere an expression is valid:

Property access

Read nested properties with dot notation or bracket syntax:
Missing nested keys via MemberExpression render as empty string; see Variables for details.

Operators

Arithmetic

+ also concatenates strings: {"Hi " + props.name}.

Comparisons

Strict equality (=== / !==) isn’t supported. Only the loose operators above are in the evaluator’s operator table. Use == / !=.

Logical

Filter calls

The only function calls allowed inside expressions are calls to registered filters:
Method calls (props.name.toUpperCase()) throw at render time. The evaluator’s CallExpression handler explicitly rejects anything that isn’t a registered filter. Use the upper filter instead.

Example usage

This branches on three conditions: adult members or guest-pass holders get a welcome; adult non-members get a prompt to join; the prompt tells everyone else they can’t attend.

Next steps

Filters are the only callables in expressions. See Filters for the built-in set and how to register your own.