Only the code you click loads.

idlip is a UI framework for server-rendered apps. No component code runs on load.

pnpm add idlip

loader.js 4.0 kB
Todos0 left
server renderpage loadclick
A model of the todo demo build. Nothing is fetched.

Hydration and resumption

Same todo app, two ways to make it respond.

The server sends HTML. The page shows before any script runs.

The HTML of the second todo

<li i-a="5">
  <input type="checkbox" on:click="$e3" i-a="6">
  <!--t7-->Build &lt;the&gt; runtime<!--/t-->
</li>

<script i-state>(self.$idlip||=[]).push(["click input keydown submit"
  /* manifest and chunk URLs, 2142 B */
  model:{draft:"",todos:[{id:"a1",text:"Write the format",done:!0},{id:"a2",text:"Build \x3Cthe> runtime",done:!1}],next:3},props:{}})])</script>

Hydration

Most frameworks

Component JS loaded
0 B
Component code runs
0

Server

2.1 kB of HTML

Network

  • No request yet
  • GET /2.1 kB
  • loader.js4.0 kB
  • 11 chunks3.4 kB
  • The click makes no request

Browser

Add
10 left
Write the format
Build <the> runtime

Resumption

idlip

Component JS loaded
0 B
Component code runs
0

Server

2.1 kB of HTML

Network

  • No request yet
  • GET /2.1 kB
  • loader.js4.0 kB
  • todo.handler.toggle.js213 B
  • todo.binding.todos._.done.js289 B

Browser

document listener state encoded state decoded
Add
10 left
Write the format
Build <the> runtime
  • Only HTML
  • Ran component code
  • Patched after the click

Hydration is modeled, not measured.

  1. Step 1. Render

    The server sends HTML. The page shows before any script runs.

    Hydration downloads and reruns every component. Resumption waits behind a 978 B listener.

    You check the second todo. Resumption fetches one handler and one binding.

    toggle changed todos.*.done. Only that path's code runs.

    The HTML of the second todo

    <li i-a="5">
      <input type="checkbox" on:click="$e3" i-a="6">
      <!--t7-->Build &lt;the&gt; runtime<!--/t-->
    </li>
    
    <script i-state>(self.$idlip||=[]).push(["click input keydown submit"
      /* manifest and chunk URLs, 2142 B */
      model:{draft:"",todos:[{id:"a1",text:"Write the format",done:!0},{id:"a2",text:"Build \x3Cthe> runtime",done:!1}],next:3},props:{}})])</script>

    Hydration

    Most frameworks

    Component JS loaded
    0 B
    Component code runs
    0

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • 11 chunks3.4 kB
    • The click makes no request

    Browser

    Add
    10 left
    Write the format
    Build <the> runtime

    Resumption

    idlip

    Component JS loaded
    0 B
    Component code runs
    0

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • todo.handler.toggle.js213 B
    • todo.binding.todos._.done.js289 B

    Browser

    document listener state encoded state decoded
    Add
    10 left
    Write the format
    Build <the> runtime
    • Only HTML
    • Ran component code
    • Patched after the click

    Hydration is modeled, not measured.

  2. Step 2. Load

    The server sends HTML. The page shows before any script runs.

    Hydration downloads and reruns every component. Resumption waits behind a 978 B listener.

    You check the second todo. Resumption fetches one handler and one binding.

    toggle changed todos.*.done. Only that path's code runs.

    The HTML of the second todo

    <li i-a="5">
      <input type="checkbox" on:click="$e3" i-a="6">
      <!--t7-->Build &lt;the&gt; runtime<!--/t-->
    </li>
    
    <script i-state>(self.$idlip||=[]).push(["click input keydown submit"
      /* manifest and chunk URLs, 2142 B */
      model:{draft:"",todos:[{id:"a1",text:"Write the format",done:!0},{id:"a2",text:"Build \x3Cthe> runtime",done:!1}],next:3},props:{}})])</script>

    Hydration

    Most frameworks

    Component JS loaded
    3.4 kB
    Component code runs
    3

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • 11 chunks3.4 kB
    • The click makes no request

    Browser

    Add
    10 left
    Write the format
    Build <the> runtime

    Resumption

    idlip

    Component JS loaded
    0 B
    Component code runs
    0

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • todo.handler.toggle.js213 B
    • todo.binding.todos._.done.js289 B

    Browser

    document listener state encoded state decoded
    Add
    10 left
    Write the format
    Build <the> runtime
    • Only HTML
    • Ran component code
    • Patched after the click

    Hydration is modeled, not measured.

  3. Step 3. Click

    The server sends HTML. The page shows before any script runs.

    Hydration downloads and reruns every component. Resumption waits behind a 978 B listener.

    You check the second todo. Resumption fetches one handler and one binding.

    toggle changed todos.*.done. Only that path's code runs.

    The HTML of the second todo

    <li i-a="5">
      <input type="checkbox" on:click="$e3" i-a="6">
      <!--t7-->Build &lt;the&gt; runtime<!--/t-->
    </li>
    
    <script i-state>(self.$idlip||=[]).push(["click input keydown submit"
      /* manifest and chunk URLs, 2142 B */
      model:{draft:"",todos:[{id:"a1",text:"Write the format",done:!0},{id:"a2",text:"Build \x3Cthe> runtime",done:!1}],next:3},props:{}})])</script>

    Hydration

    Most frameworks

    Component JS loaded
    3.4 kB
    Component code runs
    4

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • 11 chunks3.4 kB
    • The click makes no request

    Browser

    Add
    10 left
    Write the format
    Build <the> runtime

    Resumption

    idlip

    Component JS loaded
    502 B
    Component code runs
    1

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • todo.handler.toggle.js213 B
    • todo.binding.todos._.done.js289 B

    Browser

    document listener state encoded state decoded
    Add
    10 left
    Write the format
    Build <the> runtime
    • Only HTML
    • Ran component code
    • Patched after the click

    Hydration is modeled, not measured.

  4. Step 4. Patch

    The server sends HTML. The page shows before any script runs.

    Hydration downloads and reruns every component. Resumption waits behind a 978 B listener.

    You check the second todo. Resumption fetches one handler and one binding.

    toggle changed todos.*.done. Only that path's code runs.

    The HTML of the second todo

    <li i-a="5">
      <input type="checkbox" on:click="$e3" i-a="6">
      <!--t7-->Build &lt;the&gt; runtime<!--/t-->
    </li>
    
    <script i-state>(self.$idlip||=[]).push(["click input keydown submit"
      /* manifest and chunk URLs, 2142 B */
      model:{draft:"",todos:[{id:"a1",text:"Write the format",done:!0},{id:"a2",text:"Build \x3Cthe> runtime",done:!1}],next:3},props:{}})])</script>

    Hydration

    Most frameworks

    Component JS loaded
    3.4 kB
    Component code runs
    5

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • 11 chunks3.4 kB
    • The click makes no request

    Browser

    Add
    10 left
    Write the format
    Build <the> runtime

    Resumption

    idlip

    Component JS loaded
    502 B
    Component code runs
    2

    Server

    2.1 kB of HTML

    Network

    • No request yet
    • GET /2.1 kB
    • loader.js4.0 kB
    • todo.handler.toggle.js213 B
    • todo.binding.todos._.done.js289 B

    Browser

    document listener state encoded state decoded
    Add
    10 left
    Write the format
    Build <the> runtime
    • Only HTML
    • Ran component code
    • Patched after the click

    Hydration is modeled, not measured.

What you get

JavaScript before the page is ready, by app size

From 10 widgets to 1,000 widgets, idlip loads 4.8 kB before the page is ready.

idlip

  • 10 widgets4.8 kB
  • 50 widgets4.8 kB
  • 200 widgets4.8 kB
  • 1,000 widgets4.8 kB

Grows ×1.0

brumate 0.8.1

  • 10 widgets15.9 kB
  • 50 widgets23.8 kB
  • 200 widgets52.6 kB
  • 1,000 widgets201.5 kB

Grows ×12.7

Marko 6

  • 10 widgets5.9 kB
  • 50 widgets10.8 kB
  • 200 widgets28.1 kB
  • 1,000 widgets117.8 kB

Grows ×20.0

Qwik 2

  • 10 widgets37.3 kB
  • 50 widgets37.3 kB
  • 200 widgets37.3 kB
  • 1,000 widgets37.3 kB

Grows ×1.0

Gzip, loaded before the load event. The idlip bar is the loader file of the benchmark app. A loader is 4.0 kB to 7.3 kB, by the features an app uses, plus a 978 B listener inline in the HTML. Run on 2026-11-23, Apple M2, 8 cores, 8 GB, Node 26.12.1, Chrome 158. Qwik 1 was not run. All results and how they were measured

The code counter.tsx

import type { JSX } from 'idlip/jsx-runtime';

export default function Counter(props: { start: number }): JSX.Element {
  let count = props.start;

  const double = count * 2;

  function increment() {
    count = count + 1;
  }
  function decrement() {
    count = count - 1;
  }

  return (
    <main>
      <button on:click={decrement}>-</button>
      <output>{count}</output>
      <button on:click={increment}>+</button>
      <p>Double: {double}</p>
    </main>
  );
}

{
  "start": 0
}

What the todo demo loads

  • loader.js4.0 kB, with the page
  • inline listener978 B, in the HTML
  • todo.handler.toggle.js213 B, first click
  • _idlip-helpers.js1.4 kB, same click
  • todo.binding.todos._.done.js289 B, same click
  • 8 more chunksOne per event

Sizes are gzip.

Before you start

License
MIT
Version
0.x, not on npm before 0.1
Runtime
Node 22+, Vite 7+
Language
TypeScript, TSX

Start with one command.

pnpm add idlip