Skip to content

v0.1.1

Choose a tag to compare

@joshburgess joshburgess released this 02 May 15:10
· 4 commits to main since this release

Patch release.

Fixed

  • h() rest-arg API now flattens a single array child, matching React's and Inferno's createElement. Previously, the single-child fast path in normalizeChildren did not call Array.isArray, so a call like:

    h("ul", null, items.map((item) => h("li", { key: item.id }, item.label)))

    stored the array itself as a single VNode child instead of flattening it, producing broken output. Users had to spread the array (...items.map(...)) to work around it. The multi-child path already handled arrays correctly; this brings the length-1 path in line.

    Fixes the migration story for code coming from React or Inferno's createElement call sites. JSX users were unaffected because the JSX automatic runtime (tachys/jsx-runtime) was already array-aware.

Install

pnpm add tachys@0.1.1

Full diff: v0.1.0...v0.1.1