import%20marimo%20as%20moThis page is rendered with mode: wasm. 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 truly reactive — no precomputed lookup table, no
caps. Drag continuously and the cell below recomputes Python
on each input.Compare this with the Static reactivity demo,
which precomputes a fixed grid of values at build time and
ships zero Python at runtime. Both approaches have their place:
Static + precompute: instant first paint, works offline,
tiny page, but limited to a fixed value grid declared at
author time. Good default.
WASM: 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.
Use mode: wasm per-page (in book.yml's toc entry) for
chapters that genuinely need full reactivity. Leave the rest
static for fast loads.mo.md(%22%5Cn%5Cn%20%20%20%20%20%20%20%20This%20page%20is%20rendered%20with%20%60mode%3A%20wasm%60.%20Marimo's%20runtime%20loads%5Cn%20%20%20%20%20%20%20%20in%20your%20browser%20via%20Pyodide%20on%20first%20paint%20(one-time%20download%5Cn%20%20%20%20%20%20%20%20~30%20MB%3B%20subsequent%20visits%20are%20cached).%20Once%20loaded%2C%20the%20slider%5Cn%20%20%20%20%20%20%20%20below%20is%20**truly%20reactive**%20%E2%80%94%20no%20precomputed%20lookup%20table%2C%20no%5Cn%20%20%20%20%20%20%20%20caps.%20Drag%20continuously%20and%20the%20cell%20below%20recomputes%20Python%5Cn%20%20%20%20%20%20%20%20on%20each%20input.%5Cn%5Cn%20%20%20%20%20%20%20%20Compare%20this%20with%20the%20%5BStatic%20reactivity%20demo%5D(precompute_demo.md)%2C%5Cn%20%20%20%20%20%20%20%20which%20precomputes%20a%20fixed%20grid%20of%20values%20at%20build%20time%20and%5Cn%20%20%20%20%20%20%20%20ships%20zero%20Python%20at%20runtime.%20Both%20approaches%20have%20their%20place%3A%5Cn%5Cn%20%20%20%20%20%20%20%20-%20**Static%20%2B%20precompute**%3A%20instant%20first%20paint%2C%20works%20offline%2C%5Cn%20%20%20%20%20%20%20%20%20%20tiny%20page%2C%20but%20limited%20to%20a%20fixed%20value%20grid%20declared%20at%5Cn%20%20%20%20%20%20%20%20%20%20author%20time.%20Good%20default.%5Cn%20%20%20%20%20%20%20%20-%20**WASM**%3A%20full%20Python%20in%20the%20browser%2C%20every%20cell%20reactive%2C%5Cn%20%20%20%20%20%20%20%20%20%20continuous%20sliders%20work%2C%20no%20caps.%20But%20heavy%20first%20paint%20and%5Cn%20%20%20%20%20%20%20%20%20%20requires%20the%20user's%20browser%20to%20download%20Pyodide.%5Cn%5Cn%20%20%20%20%20%20%20%20Use%20%60mode%3A%20wasm%60%20per-page%20(in%20%60book.yml%60's%20%60toc%60%20entry)%20for%5Cn%20%20%20%20%20%20%20%20chapters%20that%20genuinely%20need%20full%20reactivity.%20Leave%20the%20rest%5Cn%20%20%20%20%20%20%20%20static%20for%20fast%20loads.%5Cn%20%20%20%20%20%20%20%20%22)n%20%3D%20mo.ui.slider(start%3D1%2C%20stop%3D100%2C%20value%3D10%2C%20label%3D'N')%0AnSum of 1..10 computed live: