The best javascript libraries, according to hackers
24 javascript libraries recommended in Hacker News comments over the past year, ranked by how many separate people recommend each one.
All javascript libraries
- jQueryLoved for its terse, chainable DOM API, cross-browser consistency and long-term stability, though critics say modern browsers made it redundant and larger apps turn into spaghetti.111recommend
- Picknplace.jsPick an item, scroll to move it, then place it; people like it for mobile and long lists. Critics say scroll-wheel steps are too coarse.58recommend
- Alpine.jsRecommended for adding light, reactive behavior to server-rendered HTML without writing much JavaScript. Critics say it gets verbose and hard to maintain as apps grow.50recommend
- Effect (TypeScript library)Recommended for explicit typed errors, typed dependency management and simple APIs in TypeScript apps. The most common caveat is a steep learning curve and a style that spreads through the whole codebase.38recommend
- Video.jsFree, maintained JavaScript video player with composable design and streaming support; critics find it heavy when native browser video suffices.24recommend
- Hotwire TurboGives SPA-style page updates from server-rendered HTML with little JavaScript. Critics find it more opinionated than HTMX and note it lacks signals.22recommend
- JustifA free library that brings Knuth-Plass line breaking and microtypography to web text, so justified columns look like real typesetting rather than CSS. Some note a large space in "No. 12" and slower Safari performance.20recommend
- D3.jsFree JavaScript library people pick for fully customized, interactive data visualizations, often paired with Observable. Common caveat: it struggles with very large datasets and networks.13recommend
- µJSA small, dependency-free JavaScript library that enhances server-rendered HTML with a broad feature set and no configuration needed.12recommend
- RxJSReactive streams library for JavaScript that people praise for type safety and powerful operators for complex async flows. Most common caveat: complexity and hard debugging.11recommend
- LodashWidely used JavaScript utility library of collection and object helpers, trusted for reliability and functional-style transforms. Critics note bundling and ESM compatibility problems, and that it's heavy to drop.10recommend
- Moment.jsJavaScript date library people say saves hours on hard date problems. Critics say it is large and native APIs cover simple needs.10recommend
- UnpolyPeople recommend it for progressive enhancement and easy modal overlays with little JavaScript, though some find it a bit too complex.10recommend
- left-pad npm packageTiny npm package that pads strings to a set length, filling a gap JavaScript lacked at the time. Critics call it an unnecessary dependency for trivial code.9recommend
- MadorPeople recommend Mador as a tiny, zero-dependency reactive state tool built on Proxies that works with plain nested objects. Critics mention a weird presentation and verbose syntax.9recommend
- ImmerDevelopers recommend Immer for working with immutable state in JavaScript, citing efficient modifications and a well-designed API. No criticisms were recorded.8recommend
- GolemUIOpen-source JavaScript form library that defines forms as JSON, praised for declarative, versionable definitions; critics say it isn't a new paradigm.8recommend
- htmzPeople recommend htmz as an extremely small alternative to HTMX, at about 166 bytes, that repurposes iframes for HTML-driven partial page updates.7recommend
- Alpine AJAXA small JavaScript library for AJAX-style HTML updates, recommended for simpler cases because it is smaller and more targeted than HTMX.6recommend
- Missing standard library for multithreading in JavaScriptRecommended for a clean, beautiful API for multithreading in JavaScript. Caveat: move() behaves differently depending on the data type passed to it.6recommend
- fixi.jsA tiny, minimalist JavaScript library that adds htmx-style behavior through a plain script tag. Critics say it largely rebuilds ideas from earlier frameworks like React and jQuery.5recommend
- TanStack TableDevelopers recommend it as a strong, flexible JavaScript library for building data tables, saving them from writing their own reactive table logic.5recommend
- date-fnsA battle-tested JavaScript date library with pure functions that works alongside Temporal. Critics argue native platform features now make such libraries unnecessary.5recommend
- SunCalcA JavaScript library for working out sun position and sunlight timing at a location, which people reach for in projects that need this data.5recommend