Back to the changelog
0.4.0

Async setup, directives and transitions

Most component libraries soon need a component that loads its data, a focus trap that several elements share, a dialog mounted at the end of the page and an element that animates in and out. This release adds each of them to the language, compiled to all seven targets, and Solid 2 as an eighth target you opt into.

New

  • Async setup: a component can be async and await what it needs at the top of its setup, like const user = await loadUser(id). The server renders what it loaded, and a hydrated page keeps the server's HTML while the setup runs again. A hand-written Vue parent wraps it in <Suspense>, and a Svelte app turns on its async mode.
  • Directives package a behaviour an element takes, like a focus trap or a click outside. Declare one with defineDirective and apply it as v-name={value}. Its hooks run in the browser only.
  • <Teleport to> mounts an element at the end of another part of the page once its component has mounted, like a dialog or a toast. A React package from unframework build --package now takes react-dom as a peer, for its createPortal.
  • <Transition> runs Vue's enter and leave classes on an element as it shows or hides, so your stylesheet animates it.
  • solid@2 compiles to Solid 2. Add it to targets in your configuration. solid still means Solid 1, and the default stays the seven targets.

Improved

  • A preview of one target, like unframework preview --target vue, opens with its frame across the whole canvas, with no Targets switch.
Copyright © 2026