Ram Altman
Lend me $7 trillion and the robots are a few thousand days away.
import { state } from '@markless/core';
export default function Like() @{
let liked = state(false);
<button onClick={() => (liked = !liked)}>
{liked ? 'Liked' : 'Like'}
</button>
}liked arrives with the page as data, and onClick arrives as a name, not as code. The first press loads just that handler and runs it. Like() itself never runs again.
Play any move, then press Next move:
A chess game left mid-game. Drag a piece to a dotted square, or press Next move and the side to move replies from where the game stands.
Who hears the first press depends on how the page was made:
Browser, direct module
The compiled module builds the elements, each element with an event listens for itself, and the first click starts only that click's symbol.
Browser, general path
Markless builds the elements from the compiled output, the container holds one listener per event name, and the first click starts its symbols, the state graph and the full runtime.
Server-rendered page
The server builds the elements, the inline resumer listens on the container, and the first click starts the resume module, then only what it needs.
m:on attribute. A tiny inline script reads it off the pressed element.Lend me $7 trillion and the robots are a few thousand days away.
liked at true. The heart is full before any code runs.The state graph shows how one write finds the spots that read it.