One file, every device
import { state } from '@markless/core';
export default function SeatMap() @{
let seat = state('A2');
<p>Your seat: {seat}</p>
}seat is a value the page watches, and {seat} is the spot that shows it. That is the whole plan, and it doesn't say which device it runs on.
The plan is the same on every host
Drag the file onto each host, then pick a seat:
One file, seatmap.tsrx, and three hosts: a browser, a phone and a server. Drag the file onto a host, or press.
- The browser draws the plan as a web page.
- A server prints the plan as the HTML it sends.
- The phone draws it with native buttons. Native is an early proof: the web is what ships.
Pick where it renders
The compiled component is the same in each place; only the call changes:
Browser
Call render(App, { target }) from @markless/core: a plain Vite app with no server at all.
Server
Call renderToString(), or renderToStream() to send it in pieces, for HTML that is ready when it arrives.
Multi-page app
@markless/router gives you file routes on Nitro, which deploys to many hosts.
Tests
render() and renderSSR() from @markless/vitest-browser run browser tests, with or without a server render first.
Build time
The repo’s demos can prerender pages as a preview; there is no public option yet.
iOS and macOSearly proof
Hand-written proofs, not wired to the compiler yet.
Your seat: A2
Ram: we land in a few thousand days.
- To do: Press B4. You move next to Melon Tusk, who renames your seat.
- To do: Start at
B1instead ofA2. - To do: Add a seat: in cabin.ts, put
'C1'at the end ofSEATS. It lands on a new row, with nobody beside it yet.
What stays the same everywhere
- Setup runs once. On a server the body runs there, and the browser never runs it again.
- No handler runs before its event. Fetching code early is not running it.
- A write reaches only its readers. Nothing compares an old page with a new one.
The compiler shows the plan it writes.