Design choices

2 min·Assumes: state, events

Markless decides how each page works when you
it, for any device, and picks it up in the browser on the first interaction.
import { state } from '@markless/core';

export default function Weather() @{
	let unit = state('Celsius');

	<p>Showing: {unit}</p>
}

unit is a value the page watches, and {unit} is the one spot that shows it. Before this file runs anywhere, the compiler knows both. Reading code for what it means, not only for how it is spelled, is called semantic analysis.

The analyzer maps the whole project at compile time

The compiler's analyzer, built on yuku, reads every .tsrx file for its names and references:

  • each file becomes a plan: its values, the spots that read them, and the code each event runs
  • a link step joins the plans into one map of the project
  • the bundler packs each page's code from that map

The browser does less work

Load both on a 3G phone, then press Get Started on each:

A pen-and-ink drawing of the shadcn/ui docs home page in a browser, beside a DevTools Coverage panel. A switch above reads work done in the browser, or worked out at compile time. With the browser side on, the panel lists the framework runtime, the components run again, and the event setup, and the bar reads 1,403 kB executed at load. Flip the switch and the rows shrink to the page's own code and the bar to 131 kB executed at load. On that side, press Get Started and one row appears: its handler, loaded and run only on the click. The numbers are the measured figures for this page in the Markless README.

Work done in the browser: 1,403 kB of JavaScript executed at load on the shadcn/ui docs home page.

Two copies of the shadcn/ui docs home page: the original in Next.js and the Markless port. Press Load on a 3G phone.

  • The port executes 131 kB of JavaScript at load; the original executes 1,403 kB.
  • On a 3G phone, the port answers its first click at 3.9 s; the original at 14.6 s.
  • The original runs its components again in the browser to attach their events. Markless decided that at compile time.

The page resumes instead of starting over

When a server renders the page, its HTML arrives already wired. The browser doesn't run your components again; code loads only when an event needs it. Resuming shows the first press.

What it costs

  • A handler can read only what crosses to the browser: state, element handles, props, imports and constants.
  • State sent from a server must be data, not functions.
  • Components live in .tsrx files, which need the Markless compiler and @markless/typescript-plugin.
  • Native screens are early proofs. The web is what ships.
How does this compare with other frameworks?

The rows for other projects come from their public docs. They compare mechanisms, not speed.

How you write a value On update Effect API Over server HTML
React useState and a setter Runs the component again, then diffs a virtual DOM useEffect Runs components again
Solid createSignal, read as count() Signals write the DOM createEffect Runs components again
Svelte 5 The $state rune Compiled signals $effect Runs components again
Qwik useSignal, read as .value, with $ on lazy code Signals useTask$ Resumes
Markless state('Celsius'), then plain unit Writes the compiler planned None Resumes

The big idea shows one file planned for every device.