Skip to content

Developer tools · javascript library

µJS

A small, dependency-free JavaScript library that enhances server-rendered HTML with a broad feature set and no configuration needed.

Summarized from 27 comments.

A small, dependency-free JavaScript library that enhances server-rendered HTML with a broad feature set and no configuration needed.

recommend
12
criticize
2
months recommended
2 of 13

Why people love it

  • Zero configuration, works out of the box · 4

    µJS works today across all modern browsers without any configuration.

    Mar 2026 · comment

    it covers 90% of use cases with zero configuration

    Mar 2026 · comment

    µJS manages browser history out of the box.

    Mar 2026 · comment
  • Broader feature set than alternatives · 3

    µJS covers more ground: patch mode, SSE, DOM morphing, View Transitions, prefetch, polling, full HTTP verb support.

    Mar 2026 · comment

    µJS is a bit more feature-rich (patch mode, SSE, DOM morphing, View Transitions...)

    Mar 2026 · comment

    dependency-free and covers a much broader feature set

    Mar 2026 · comment
  • Builds on native browser features · 2

    if the browser already does it (View Transitions, FormData, fetch, AbortController, history API), don't reimplement it.

    Mar 2026 · comment

    µJS is designed exactly with that philosophy in mind: standard links and forms work without JS, µJS just enhances them.

    Mar 2026 · comment
  • Small and dependency-free · 2

    dependency-free and covers a much broader feature set

    Mar 2026 · comment

    this is impressively small

    Mar 2026 · comment

What hackers pick instead

Every quote

The 22 most detailed of 27 comments. Each links to the original.

  1. if the browser already does it (View Transitions, FormData, fetch, AbortController, history API), don't reimplement it.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  2. µJS is designed exactly with that philosophy in mind: standard links and forms work without JS, µJS just enhances them.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  3. µJS covers more ground: patch mode, SSE, DOM morphing, View Transitions, prefetch, polling, full HTTP verb support.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  4. µJS is a bit more feature-rich (patch mode, SSE, DOM morphing, View Transitions...)

    Mixed · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  5. µJS works today across all modern browsers without any configuration.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  6. dependency-free and covers a much broader feature set

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  7. it covers 90% of use cases with zero configuration

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  8. µJS manages browser history out of the box.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  9. a single `mu.init()` call is all you need

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  10. this is impressively small

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  11. The default routing approach is an awesome idea, swapping the entire body by default is also really interesting.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  12. This is actually one of the advantages of this approach over a true SPA

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  13. Looks useful! I skimmed through the docs and had a question.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  14. they're designed around server-rendered HTML fragments.

    Mixed · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  15. No JavaScript to write, no state to manage client-side.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  16. the browser history being messed up drives me bonkers

    Mixed · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  17. That's exactly what patch mode is designed for.

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  18. i have added it to the htmx alternatives page

    Recommends · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  19. I like the idea. DOM morphing is nice.

    Mixed · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  20. I love this- I'll give it a spin.

    Mixed · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  21. it doesn't seem to work for me, because it only considers relative urls to be

    Criticizes · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

  22. Another library ignores shadow dom.

    Criticizes · Mar 2026 · in “Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies”

Counts from 1,795,640 Hacker News comments, Nov 2025 to Nov 2026. How we count · Report a mistake