A React 18 + TypeScript app that runs on Blitz's
experimental JavaScript engine (blitz-script, the Boa-based engine from the
js-engine branch /
DioxusLabs/blitz PR #491) — no Chromium, no WebKit, no webview.
It exercises the interactive-app contract end to end:
- Card flip on click (CSS transition, 2D
scaleXfallback — no 3D transforms yet) :hoverstates on list items and buttons- "Load more" list (paged state updates)
- Controlled filter input (typing re-renders the filtered list, with an empty state when nothing matches)
- Viewport readout from
window.innerWidth/innerHeightat mount
The app is prebuilt: dist/{index.html,bundle.js} are committed, so you don't
need node to run it.
It needs a few small DOM additions on top of the js-engine branch
(classList, closest, dataset, hidden, innerWidth/innerHeight,
DOM interface constructors, getModifierState, selectionStart/End,
window-event dispatch), plus an event-driver fix so macOS editing
keybindings (Backspace etc.) dispatch input events — available as a
patch series on the react-dom-apis branch.
git clone --branch react-dom-apis https://github.com/devarda/blitz.git blitz
cd blitz
cargo run --release --example preact_script ../react-blitz-demo/dist/index.html(preact_script is the tree's script-enabled viewer example — it loads any
HTML file with blitz-script active.)
Only needed when src/ changes (requires node):
bash build.sh # tsc --noEmit + esbuild -> dist/bundle.js