bitstillery/mithril

Modernized Mithril with Typescript, Bun tooling, SSR, Signals & State proxy

TypeScript

1

3,075 commits

updated Oct 7, 2026

See the code

See what people are saying

SourceMessageScoreDate

Show HN: Mithril, Bitstillery Edition

2

Oct 7, 2026

README

Mithril, Bitstillery edition

Mithril.js with signals, reactive state, server rendering and a persistent store. Strict TypeScript, developed with Bun.

  • Signals — components redraw when a signal they read changes; no m.redraw(). state() makes a plain object reactive, its functions become computeds. signal(), computed(), effect() and watch() for direct use.
  • TypeScript — ships its source, no @types package or build step. State, JSX attributes, routes and m.route.Link are typed; the library has no any.
  • SSR — async oninit is awaited on the server; HTML and state go to the client, which hydrates without refetching. Bun server helpers with sessions included.
  • Store — per-value persistence: localStorage, sessionStorage, server session, or a cookie the server can render from.
  • Measured — batched redraws, and a benchmark suite covering render, signals, state, store, router and SSR.

Mithril v2 apps run unchanged, except m.request and streams: use fetch().

import m, {state} from '@bitstillery/mithril'

const $s = state({count: 0})

m.mount(document.body, {
    view: () => <button onclick={() => $s.count++}>Clicked {$s.count} times</button>,
})

Getting started

bun add @bitstillery/mithril

Guides: setup, signals, state, SSR, store; the rest of docs/site/content/ covers core Mithril. Example apps: examples/state/, examples/ssr/.

Development

bun install
bun test       # tests
bun run lint   # format, lint, type-check
bun run bench  # benchmarks; bench:render etc. for one topic

License

MIT — see LICENSE. Mithril was created by Leo Horie; thanks to all Mithril.js contributors.

frontend
mithril
signals
ssr
typescript
vdom

bitstillery/mithril

Modernized Mithril with Typescript, Bun tooling, SSR, Signals & State proxy

TypeScript

1

3,075 commits

updated Oct 7, 2026

See the code

See what people are saying

SourceMessageScoreDate

Show HN: Mithril, Bitstillery Edition

2

Oct 7, 2026

README

Mithril, Bitstillery edition

Mithril.js with signals, reactive state, server rendering and a persistent store. Strict TypeScript, developed with Bun.

  • Signals — components redraw when a signal they read changes; no m.redraw(). state() makes a plain object reactive, its functions become computeds. signal(), computed(), effect() and watch() for direct use.
  • TypeScript — ships its source, no @types package or build step. State, JSX attributes, routes and m.route.Link are typed; the library has no any.
  • SSR — async oninit is awaited on the server; HTML and state go to the client, which hydrates without refetching. Bun server helpers with sessions included.
  • Store — per-value persistence: localStorage, sessionStorage, server session, or a cookie the server can render from.
  • Measured — batched redraws, and a benchmark suite covering render, signals, state, store, router and SSR.

Mithril v2 apps run unchanged, except m.request and streams: use fetch().

import m, {state} from '@bitstillery/mithril'

const $s = state({count: 0})

m.mount(document.body, {
    view: () => <button onclick={() => $s.count++}>Clicked {$s.count} times</button>,
})

Getting started

bun add @bitstillery/mithril

Guides: setup, signals, state, SSR, store; the rest of docs/site/content/ covers core Mithril. Example apps: examples/state/, examples/ssr/.

Development

bun install
bun test       # tests
bun run lint   # format, lint, type-check
bun run bench  # benchmarks; bench:render etc. for one topic

License

MIT — see LICENSE. Mithril was created by Leo Horie; thanks to all Mithril.js contributors.

frontend
mithril
signals
ssr
typescript
vdom