Skip to content
Vincle
Esc

Loading…

    Server-side JSX renderer

    Your views in JSX.
    Your app in HTML.

    Compose typed, async components in your existing server. Start with an HTML response, then let slower parts of the page arrive when they are ready.

    npm install @vincle/core
    
    pnpm add @vincle/core
    
    bun add @vincle/core
    
    From JSX to HTMLTypeScript
    hello.tsx
    import { renderToString } from "@vincle/core";function App({ name }: { name: string }) {  return <h1>Hello, {name}!</h1>;}const page = <App name="world" />;const html = await renderToString(page);
    <h1>Hello, world!</h1>
    

    The rendered output is a plain HTML string.

    Supported runtimes
    • Node.js
    • Bun
    • Deno
    • Cloudflare Workers

    Start with one view.
    Grow with your page.

    Keep your server and routing. Choose how much rendering behavior each page needs.

    Defer the slow parts

    Add @vincle/flow to send the page shell first, then deliver deferred HTML fragments.

    Stream a fragment

    The page can arrive before the results.

    Keep the heading visible while an async component loads. With flow, a fallback fills the space until its HTML is ready.

    Choose how it is delivered: natively, or through an HTMX or Turbo adapter.

    Follow the complete example
    results-page.tsx
    // Results is an ordinary async component; the page opts in:function Page() {  return (    <main>      <h1>Search results</h1>      <Defer fallback={<p>Loading results…</p>}>        <Results />      </Defer>    </main>  );}const stream = renderToStream(() => <Page />, NativeAdapter);

    1 · The shell arrives first

    Search results

    Loading results…

    2 · The patch replaces the fallback

    Search results

    The patch, as sent on the wire
    <template data-for="fragment-1"><ul><li><a href="/guide/getting-started/installation">Getting started</a></li></ul></template>

    Built into the renderer.

    Typed views, predictable rendering, and explicit HTML boundaries.

    View source on GitHub