WASM demo
<span class="markdown prose dark:prose-invert contents"><span class="paragraph">This page is rendered with <code>mode: wasm</code>. Marimo's runtime loads in your browser via Pyodide on first paint (one-time download ~30 MB; subsequent visits are cached). Once loaded, the slider below is <strong>truly reactive</strong> — no precomputed lookup table, no caps. Drag continuously and the cell below recomputes Python on each input.</span> <span class="paragraph">Compare this with the <a href="precompute_demo.md">Static reactivity demo</a>, which precomputes a fixed grid of values at build time and ships zero Python at runtime. Both approaches have their place:</span> <ul> <li><strong>Static + precompute</strong>: instant first paint, works offline, tiny page, but limited to a fixed value grid declared at author time. Good default.</li> <li><strong>WASM</strong>: full Python in the browser, every cell reactive, continuous sliders work, no caps. But heavy first paint and requires the user's browser to download Pyodide.</li> </ul> <span class="paragraph">Use <code>mode: wasm</code> per-page (in <code>book.yml</code>'s <code>toc</code> entry) for chapters that genuinely need full reactivity. Leave the rest static for fast loads.</span></span>
<span class="markdown prose dark:prose-invert contents"><span class="paragraph">Sum of 1..10 computed live:</span> <ul> <li>Loop: <strong>55</strong></li> <li>Closed form (n·(n+1)/2): <strong>55</strong></li> </ul></span>