A simple, dependency-free JSX runtime that renders JSX directly to raw HTML strings for static HTML template engines. Version 1.0.1 is the latest stable release, with no recent updates since 2022. Differentiators: no virtual DOM, no client-side hydration, purely static HTML generation. Supports both classic and automatic JSX transforms, function components, custom elements, and raw HTML escaping. Unlike React or Preact, it is not intended for interactive UIs but for server-side templating akin to Handlebars or Nunjucks, but with JSX syntax. Ships TypeScript types.
npm install static-jsxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Renders JSX to an HTML string using automatic transform, demonstrating component usage, interpolation, and RawHtml for unescaped HTML.
Use ES import syntax or upgrade Node.js to ESM support.
Use a bundler that supports the exports field (e.g., webpack 5+, Rollup, Vite).
Access the html property: element.html.
Wrap safe HTML strings: new RawHtml('<div>safe</div>').Use import instead of require().
Update bundler configuration or use classic transform with manual imports.
Install the package: npm install static-jsx. Ensure import path is 'static-jsx'.
No dependency data recorded yet.