HNHacker News
TopNewBestAskShowJobs

TonyPeakman

48 karma · joined August 6, 2025

the author of dagger.js https://github.com/dagger8224/dagger.js https://daggerjs.org
submissionscomments
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Solid is definitely in that “compile-to-direct-DOM” camp, and I think it’s awesome — it shows how far you can push the reactive model with JSX + fine-grained updates.

dagger.js is coming from the opposite direction: no compiler, no JSX, and also no signals. just plain HTML with attributes like +click / +load. You drop in a <script> from a CDN and it wires up behavior at runtime. It’s more about zero build friction and “view-source-ability”than squeezing out maximum perf.

So if Solid is about compiling React-like ergonomics down to efficient DOM transforms, dagger is about skipping compilation entirely and letting you glue components together with HTML. Two very different trade-offs, but complementary ends of the spectrum.

TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Thanks for your comment. — typed JSX ergonomics are really nice, and most compile-time frameworks today make you choose between that and some sort of template DSL. However, dagger.js takes a different angle: it doesn’t try to be “React-like compiled,” it tries to be no-compile at all. State is just plain JS, DOM transforms happen directly via attributes (+click, +load, etc.), and everything is HTML you can literally view-source. So it’s not competing with React/Svelte on compile sophistication — it’s aiming to be the lightweight “glue” around whatever components you like, while keeping the HTML open and approachable.

I really hope you will try using dagger.js and come back to tell me how you feel about it. Thanks!

TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
That’s a good comparison — Svelte also started from the “write less, ship less” idea, and I have a lot of respect for it.

The big difference is that Svelte achieves that by compiling away the framework, whereas Dagger.js avoids compilation entirely. You don’t install a CLI, you don’t run a build — you literally drop a <script> from a CDN and wire up directives in plain HTML. It’s closer to Alpine/htmx in that sense, but with a focus on working alongside Web Components.

So in spirit, yes — both try to reduce overhead. Svelte optimizes post-build output; Dagger.js tries to remove the build step altogether.

Here is a dagger.js version Hello world demo:https://codepen.io/dagger8224/pen/raOXxee?editors=1010

TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
haha, it's sharp but not dangerous :}
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Really appreciate that. The “old school” vibe is deliberate — I wanted to lower the barrier so that you can share a snippet or inspect a page and actually learn from it, the way we used to with plain HTML/JS. Frameworks are great, but sometimes it’s nice to have a path that prioritizes openness and simplicity over machinery.
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Thanks for your comment.That's right — the compiled/optimized end of the spectrum is powerful, and I think Prepack showed just how far you can push that. However, dagger.js is intentionally the opposite: it trades the simplest usage for zero build, instant setup. My focus is “drop in a <script> and go,” not competing with compiler-driven stacks. In practice I see them as complementary — one for squeezing every byte/cycle, the other for minimizing friction and complexity.
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Thanks for reporting this issue, it's fixed now. Welcome back to scoop up dagger.js :)
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Hey xupybd,thanks for reporting the issue,you may refer to the alternative site: https://000712133.deployed.codepen.website/#overview/introdu...

Thanks

TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
Thanks for reporting this, jodacola, it seems there is domain parsing issue sometimes, you may refer to the alternative site: https://000712133.deployed.codepen.website/#overview/introdu...
TonyPeakman··on Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework
thanks for taking a look!

Positioning: Think Alpine/Vue-like ergonomics but no build and WC-first.

Size & perf: Focus is on simplicity and startup latency over framework features. I’m not posting synthetic benchmarks; if you have a real page you want me to try, I’ll profile it and share results.

Interop: Works with native Custom Elements. I’m preparing examples with Shoelace/FAST.

Security: Directives are sandboxed; no eval. If you spot an injection risk, please open an issue and I’ll patch quickly.

Limitations: Complex state management, SSR/streaming, and huge SPA routing aren’t first goals.

License: MIT.

Contrib: Issues and small PRs welcome (docs, examples, tests especially).

I’ll stay in the thread to answer questions and incorporate feedback into the docs.

← PreviousPage 2 of 2