What JSX can render

Besides strings, numbers and elements, Jeasx renders many JavaScript values directly, so you rarely have to convert data before putting it into markup.

Each sample shows the rendered result and the generated HTML.

Children

PromisesA promise is awaited and its value rendered in place.
Result

Hello from a promise!

HTML
<p>Hello from a promise!</p>
Sets and other iterablesAny iterable renders its items, e.g. a Set, a Map or an iterator with helper methods like .map(). No need for Array.from().
Result
  • apple
  • banana
  • cherry
HTML
<ul><li>apple</li><li>banana</li><li>cherry</li></ul>
GeneratorsA generator function can be used as a component and yields its items one by one.
Result
  1. 0
  2. 1
  3. 1
  4. 2
  5. 3
  6. 5
  7. 8
  8. 13
HTML
<ol><li>0</li><li>1</li><li>1</li><li>2</li><li>3</li><li>5</li><li>8</li><li>13</li></ol>
Dates, URLs and errorsObjects with their own toString render as escaped text.
Result

Created at Fri Oct 30 2026 00:00:00 GMT+0000 (Coordinated Universal Time)
Fetched from https://www.jeasx.dev/?q=%3Cjsx%3E
Failed with Error: Something went wrong

HTML
<p>Created at Fri Oct 30 2026 00:00:00 GMT+0000 (Coordinated Universal Time)<br>Fetched from https://www.jeasx.dev/?q=%3Cjsx%3E<br>Failed with Error: Something went wrong</p>
BytesA Uint8Array or Buffer renders as UTF-8 text, e.g. a file read with fs.readFile() or the bytes of a fetch() response.
Result
Bytes are decoded as UTF-8 text: ✓ <b>escaped</b>
HTML
<pre>
Bytes are decoded as UTF-8 text: ✓ &lt;b&gt;escaped&lt;/b&gt;</pre>
BigInts and zeroBigInts render as numbers, and 0 isn't swallowed like in other templating languages.
Result

18446744073709551616 / 0

HTML
<p>18446744073709551616 / 0</p>
Nothing at allnull, undefined, booleans, empty arrays, functions and plain objects render nothing.
Result

HTML
<p></p>

Attributes

Promise attributesA promise as attribute value is awaited. All promise attributes of a tag are loaded in parallel.
Result
Avatar loaded asynchronously
HTML
<img src="/values/avatar-VCEHPDAG.svg" alt="Avatar loaded asynchronously" width="64" height="64">
Objects and arrays as JSONPlain objects and arrays are encoded as JSON, e.g. to pass data to client-side scripts.
Result
Inspect me
HTML
<div data-config="{&quot;theme&quot;:&quot;dark&quot;,&quot;columns&quot;:3}" data-ids="[1,2,3]">Inspect me</div>
URLs, dates and booleansValues with their own toString use their string form, true renders the attribute name only.
Result
HTML
<a href="https://expo.jeasx.dev/values" data-date="Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)" download>Download</a>
Skipped valuesFunctions, null, false and objects without their own string form (e.g. a Set) are skipped, so an event handler never prints its source code.
Result
HTML
<button type="button">Click me</button>