What are Rhai Components?

Poet's shortcodes syntax is based on the Rhai scripting language.

Rhai is a small, fast, easy-to-use scripting language and evaluation engine that integrates tightly with Rust.

The only extension that Poet makes to Rhai is the component { ... } block inside which you can place a JSX-like syntax. This syntax is very simialar to JSX and we explain the differences based on some examples in the Poet and JSX differences article.

To learn more about the Rhai syntax itself, you can refer to their documentation.

A big thank you to @schungx from the Rhai team for helping us with implementing the Rhai components in Poet!