Skip to content

@fiorejs/jsx 1.0.0

Choose a tag to compare

@vrtexe vrtexe released this 15 Nov 16:22
· 35 commits to main since this release

First release of @fiorejs/jsx: a JSX runtime for fiorejs. HTML and SVG written as JSX become real DOM nodes, created once, with no virtual DOM and no re-rendering. It needs fiorejs 1.2.0 or later.

  • Props go to properties, attributes or listeners by name: on + event name becomes a listener (onClick and onclick both listen to click), style objects set style properties, and null removes an attribute.
  • Function components, fragments and async components; an async component shows a placeholder comment until it resolves.
  • Signals and getters from a plugin such as @fiorejs/signals work as live props and children.
  • Typed per element: props, attributes and event handlers are checked against the element they are written on.

Install with npm install fiorejs @fiorejs/jsx and set jsxImportSource to @fiorejs/jsx. The README lists how each prop is applied.