[]previous and next page

Fallbacks, nested arrays and fragments

Related: fine-grained rendering, lists and keys, For, Index, insert, mapArray.

For agentsUpdated
  • A For / Index with fallback shows it while the list is empty and replaces it with the rows when items arrive.
  • Arrays given to insert are flattened, nested arrays included, with an explicit stack (no recursion), so nesting depth is not limited by the call stack. An array that contains itself throws TypeError: insert(): a value contains itself.
  • A function anywhere inside an array is an accessor: it is called inside the same render effect, so its reads are tracked.
  • A DocumentFragment contributes a snapshot of its child nodes; the fragment itself ends up empty.
  • null, undefined and booleans render nothing. Numbers become Text.

Related: fine-grained rendering, lists and keys, For, Index, insert, mapArray.