Best of JavaScriptApril 2026

  1. 1
    Article
    Avatar of css_tricksCSS-Tricks·4w

    Selecting a Date Range in CSS

    A tutorial demonstrating how to build a CSS-driven date range selector using the `:nth-child(n of selector)` syntax. The approach uses checkboxes for state and CSS selectors to handle both the range highlighting and the JavaScript logic for managing which dates are selected. The key insight is that `:nth-child(2 of :has(:checked))` lets you target checked elements by their position among checked siblings, simplifying both the JS range-adjustment logic and the CSS range styling to just a few lines.

  2. 2
    Article
    Avatar of programmingdigestProgramming Digest·5w

    Sorting algorithms

    Simon Willison used Claude Artifacts on his phone to build interactive animated demonstrations of common sorting algorithms (bubble sort, selection sort, insertion sort, merge sort, quick sort, heap sort). He then prompted Claude to add Python's Timsort by cloning the CPython repo from GitHub and consulting the source files. A 'run all' button was added to display all algorithms simultaneously in a grid. Notably, when GPT-5.4 Thinking reviewed Claude's Timsort implementation, it found it to be a simplified, Timsort-inspired adaptive mergesort rather than a true Timsort.

  3. 3
    Article
    Avatar of bunBun·4w

    Bun v1.3.12

    Bun v1.3.12 ships with a large set of new features and bugfixes. Highlights include native headless browser automation via Bun.WebView (WebKit and Chrome backends), terminal Markdown rendering with `bun ./file.md`, an in-process Bun.cron() scheduler, async stack traces for native errors, 2.3x faster URLPattern, 2x faster Bun.Glob.scan, cgroup-aware parallelism on Linux, TCP_DEFER_ACCEPT for Bun.serve(), HTTPS proxy CONNECT tunnel reuse, SIMD-optimized ANSI string utilities, upgraded JavaScriptCore engine with explicit resource management support, and over 120 bug fixes covering Node.js compatibility, memory leaks, crashes, and security issues.

  4. 4
    Article
    Avatar of infoworldInfoWorld·3w

    HTMX 4.0: Hypermedia finds a new gear

    HTMX 4.0 is a major release that replaces the legacy XHR transport layer with the modern Fetch API, enabling native streaming of HTML fragments via ReadableStream. Key changes include: Idiomorph DOM morphing algorithm now bundled in core (was an extension in 2.x), explicit prop inheritance replacing implicit inheritance, removal of the brittle localStorage history engine, status-specific error swapping syntax (e.g. hx-status:404), a new <hx-partial> tag for cleaner multi-target server responses, and native View Transitions API integration. Despite HTMX 2.0 being declared the final version, the team jumped to 4.0 to honor the 'no 3.0' promise while delivering a refactor that adds more power with less complexity, keeping the library at ~14KB.

  5. 5
    Article
    Avatar of allthingssmittyMatt Smith·3w

    Why I don't chain everything in JavaScript anymore

    Method chaining in JavaScript looks clean but can hurt readability, hide unnecessary work, and make debugging harder. Breaking long chains into named intermediate steps makes code easier to read, debug, and reason about. A practical rule: chains of 1-2 steps are fine, 3-4 steps warrant a pause, and 5+ steps should almost always be split up. The same principle applies to async promise chains, where mixing control flow with data transformation in one chain adds cognitive overhead.

  6. 6
    Video
    Avatar of javascriptmasteryJavaScript Mastery·3w

    TanStack Start Full Course 2026 | Build and Deploy a Full Stack Application

  7. 7
    Article
    Avatar of nodejsNode.js·3w

    Node.js — Node.js 24.15.0 (LTS)

    Node.js 24.15.0 'Krypton' LTS has been released with several notable changes: a new --max-heap-size CLI option, require(esm) and module compile cache marked as stable, raw key format support added to KeyObject crypto APIs, a throwIfNoEntry option for fs.stat, HTTP/1 fallback configuration for HTTP/2, setTOS/getTOS added to Socket, SQLite marked as release candidate with a new limits property, C++ support for diagnostics channels, and improvements to the test runner including worker ID exposure and SIGINT handling. The release also includes numerous bug fixes across streams, crypto, HTTP, ESM, and buffer modules, plus dependency updates including npm 11.12.1, SQLite 3.52.0, and updated root certificates.

  8. 8
    Article
    Avatar of alexcloudstarAlex CloudStar·4w

    ES2026 JavaScript Features: Complete Developer Guide

    ES2026 brings several significant improvements to JavaScript. The Temporal API replaces the broken Date object with immutable, timezone-aware types. The 'using' and 'await using' declarations automate resource cleanup via Symbol.dispose, eliminating manual try/finally boilerplate. Error.isError() provides reliable cross-realm error detection. Array.fromAsync() simplifies collecting async iterables into arrays. Import attributes add explicit type safety to JSON/CSS imports. Math.sumPrecise() offers compensated floating-point summation. Browser and Node.js support is rolling out in 2026, with polyfills available for earlier adoption.

  9. 9
    Article
    Avatar of webweb.dev·2w

    New to the web platform in April

    Chrome 147 and Firefox 150 shipped to stable in April 2026, bringing several new web platform features. Highlights include the contrast-color() CSS function reaching Baseline (returns black or white for maximum contrast against a given color), scroll-driven animation range properties becoming Baseline, the ariaNotify() method for screen reader announcements, auto sizes for lazy-loaded images, element-scoped view transitions, the CSS border-shape property for non-rectangular borders, SVG textPath path attribute support, modulepreload for JSON and CSS modules, and Math.sumPrecise. Beta releases (Chrome 148, Firefox 151, Safari 26.5) preview name-only container queries, lazy loading for video/audio, CSS container style queries, and the :open pseudo-class.

  10. 10
    Article
    Avatar of denoDeno·2w

    Fresh 2.3: Zero JS by default, View Transitions, and Temporal support

    Fresh 2.3 delivers on its zero-JavaScript-by-default promise by only injecting client scripts when islands or partials are actually used, dropping 14–22 KB from static pages. New features include View Transitions API integration via a single HTML attribute, first-class WebSocket support with managed and bare modes, CSP nonce injection, IP filter middleware with CIDR support, OpenTelemetry server-to-browser trace propagation, Temporal API support in island props, multiple static directories, loading indicators on form submissions, and reverse proxy support. The release also includes significant Vite integration improvements, dropping two Babel passes, and numerous routing and partials bug fixes.

  11. 11
    Article
    Avatar of lobstersLobsters·4w

    The Business Case for Vanilla JS

    A developer argues for using Vanilla JS and native browser APIs over SPA frameworks like React for production web apps. The core argument is that React's abstraction leaks heavily (hooks, hydration, component trees), browser APIs are stable and well-documented, and plain JS is simpler to maintain long-term. The author shares personal experience abandoning Preact mid-project in favor of direct DOM manipulation, finding it easier and more reliable. The post challenges the assumption that modern frameworks are necessary or superior for most use cases.

  12. 12
    Article
    Avatar of phProduct Hunt·3w

    React apps that render in the terminal and browser

    gridland is a React framework that enables building terminal applications capable of rendering in both the terminal and the browser. This dual-render approach lets developers demo their terminal apps in a browser without requiring users to install anything upfront. The gridland.io website itself is built with the framework, serving as a live demonstration.

  13. 13
    Video
    Avatar of codeheadCodeHead·3w

    Frontend Concepts I Bet You DIDN'T KNOW

    A quick overview of frontend concepts that many developers use but don't fully understand. Topics covered include hydration, partial hydration, islands architecture (Astro.js), streaming SSR, React Fiber and concurrent rendering, time slicing, the pitfalls of useMemo and stale closures, and the JavaScript event loop's microtask vs macrotask execution order.

  14. 14
    Article
    Avatar of neciudanNeciu Dan·2w

    What's actually new in JavaScript (and what's coming next)

    A comprehensive walkthrough of ES2025 and upcoming ES2026 JavaScript features. ES2025 shipped iterator helpers (lazy .map/.filter/.take on iterators), new Set methods (union, intersection, difference), JSON modules with import attributes, Promise.try, RegExp.escape, and Float16Array. ES2026 brings the `using` keyword for automatic resource cleanup, the long-awaited Temporal date API replacing Date, import defer for lazy module evaluation, Math.sumPrecise for accurate float summation, Uint8Array base64/hex methods, Error.isError for cross-realm error checking, Iterator.concat, Map.getOrInsert, Array.fromAsync, and JSON.parse source text access. The post also covers the TC39 proposal process, what didn't make it (decorators, pipeline operator, pattern matching), and includes a ready-to-use system prompt snippet to guide AI coding assistants toward these modern APIs instead of outdated patterns.

  15. 15
    Video
    Avatar of wdsWeb Dev Simplified·4w

    You Need To Start Using This Underrated React Hook

    A practical walkthrough of React's useSyncExternalStore hook as an alternative to useEffect for syncing external browser state into React. Covers three use cases: tracking navigator.onLine status, syncing HTML dialog element open/close state (including keyboard escape handling), and building a lightweight global store similar to Zustand or Redux without Context. Explains the hook's subscribe/snapshot/server-snapshot parameters and shows how to avoid common pitfalls like stale state references.

  16. 16
    Article
    Avatar of bramBram.us·5w

    Introducing view-transitions-toolkit, a collection of utility functions to more easily work with View Transitions.

    view-transitions-toolkit is a new npm package that bundles reusable utility functions for working with the View Transitions API. It includes helpers for feature detection, shimming document.activeViewTransition, extracting and optimizing animations, controlling transition playback (pause/resume/scrub), and automatically injecting transition types based on navigation. The package is available on npm and comes with a demo site at chrome.dev/view-transitions-toolkit/.

  17. 17
    Article
    Avatar of nodejsNode.js·5w

    Node.js — Node.js 25.9.0 (Current)

    Node.js 25.9.0 (Current) has been released with several notable changes. The test runner's module mocking API has been consolidated: `MockModuleOptions.defaultExport` and `MockModuleOptions.namedExports` are merged into a single `MockModuleOptions.exports` option, with an automated codemod migration available. Other semver-minor additions include `using` scopes for `AsyncLocalStorage`, a new `--max-heap-size` CLI flag, TurboSHAKE and KangarooTwelve Web Cryptography algorithms, customizable REPL error handling, removal of the `node:domain` dependency from REPL, ESM code cache support in Single Executable Applications (SEA), and a new `stream/iter` implementation. Additional fixes cover zlib use-after-free, ESM path normalization, Buffer performance improvements, and various dependency updates including npm 11.12.1 and SQLite 3.51.3.

  18. 18
    Article
    Avatar of twirThis Week In React·4w

    This Week In React #276: Next.js, Boneyard, MUI, React Router, Ink, shadcn, Docusaurus, Comark, Forms, Shaders

    Weekly roundup covering React and React Native ecosystem news. React highlights include Boneyard (auto-generated skeleton screens), Ink 7.0 (React CLI renderer with React 19.2 support), Material UI 9.0, Mantine 9.0, React Hook Form 7.72 with form-level validation, Docusaurus 3.10, React Router 7.14 with Vite 8 support, and a new Comark markdown parser. React Native 0.85 ships with a new Shared Animation Backend (enabling native driver for layout props), DevTools improvements for simultaneous CDP connections, and Metro TLS support. Also covered: ViewTransition support for RN Fabric (in progress), Skia Graphite pre-release, RN Windows 0.82, and the axios npm supply chain compromise. Other JS ecosystem news includes JSIR (Google's JavaScript IR proposal), esbuild 0.28, ESLint 10.2, and Ky 2.0.

  19. 19
    Video
    Avatar of gamefromscratchGamefromscratch·3w

    Phaser 4 is HERE - Biggest Release Ever!

    Phaser 4 has been released, marking the biggest update in the JavaScript/TypeScript 2D game framework's 10+ year history. The centerpiece is a completely new WebGL renderer with a node-based architecture that replaces the V3 pipeline. Key performance improvements include a Sprite GPU Layer capable of rendering millions of sprites at up to 100x the previous speed, a new Tile Map GPU Layer that renders entire maps as a single quad with per-pixel shader cost, smarter multitexture batching, and just-in-time rendering. Additional changes include a unified filter system combining FX and masks, new game objects (gradient, noise variants, stamp), improved lighting, and built-in support for AI coding tools like Cursor, Copilot, and Codex. Phaser remains MIT-licensed and open source, with an optional commercial editor available for $12–$15/month.

  20. 20
    Article
    Avatar of jswklyJavaScript Weekly·1w

    JavaScript Weekly Issue 783: April 28, 2026

    JavaScript Weekly issue 783 curates the latest in the JS ecosystem. Highlights include a comprehensive overview of ES2025 and ES2026 features (iterator helpers, Promise.try, Map.getOrInsert, Temporal), a new JS package manager called Aube focused on performance, Nano Stores 1.3 (a 286-byte framework-agnostic state manager), tips on debugging WASM in Chrome DevTools, writing Node.js addons with .NET Native AOT, and a guide on the simplest C-to-WebAssembly-to-JS pipeline. Also covered: Cloudflare agent-readiness tools, Cypress TypeScript 6.0 upgrade, and miscellaneous ecosystem news.

  21. 21
    Article
    Avatar of infoworldInfoWorld·2w

    The best JavaScript certifications for getting hired

    JavaScript remains the most in-demand programming language for over a decade, and certifications can help candidates stand out in hiring pipelines — especially for early-career developers or career switchers. Experts note that certs are not a primary hiring signal but can serve as a credibility anchor or tie-breaker in high-volume or compliance-driven roles. A curated list of notable JavaScript certifications is provided, including CIW JavaScript Specialist, FreeCodeCamp's JS Algorithms and Data Structures, W3Schools JavaScript Developer Certificate, JS Institute's JSA and JSE certifications, Mimo JavaScript Certification, the now-retired OpenJS JSNAD, and Certificates.dev's Senior JavaScript Developer cert. Strong portfolios with real projects still outweigh certifications in most hiring decisions.

  22. 22
    Video
    Avatar of lowlevellearningLow Level Learning·2w

    we're hacking PDFs again?

    A zero-day vulnerability in Adobe Acrobat Reader has been actively exploited since September, leveraging the PDF JavaScript engine to perform sandbox escapes. The malware uses obfuscated JavaScript embedded in PDFs, exploits Adobe's RSS feed functionality to make outbound network requests (bypassing sandbox restrictions), and fingerprints the victim's Windows version by reading ntdll.dll before fetching a targeted exploit payload from a remote server. Adobe confirmed an active critical RCE vulnerability in a security bulletin on April 12th. Users are advised to avoid opening untrusted PDFs and to monitor for suspicious network patterns including language, platform, and viewer version data in outbound requests.

  23. 23
    Article
    Avatar of hnHacker News·2w

    What Async Promised and What it Delivered — Causality

    A historical analysis of async programming's evolution from callbacks to promises to async/await, examining how each wave solved the previous wave's worst problem while introducing new structural costs. Callbacks solved thread-per-connection resource exhaustion but created callback hell and fragmented error handling. Promises improved ergonomics but introduced silent error swallowing and a type split. Async/await made code readable but brought function coloring — a viral infection of async signatures throughout codebases — ecosystem fragmentation (e.g., Tokio vs async-std in Rust), new deadlock classes like 'futurelocks', and a sequential trap where the clean syntax actively hides parallelism opportunities. The post notes that Go's goroutines, Java's Project Loom virtual threads, and Zig's Io interface parameter represent deliberate attempts to avoid function coloring entirely.

  24. 24
    Article
    Avatar of frontendmastersFrontend Masters·5w

    What To Know in JavaScript (2026 Edition) – Frontend Masters Blog

    A comprehensive 2026 overview of the JavaScript ecosystem covering ECMAScript 2025 and upcoming ES2026 features (Temporal API, Iterator Helpers, Set methods, RegExp.escape, Promise.try, explicit resource management), major framework updates (React 19, Vue 3.6, Svelte 5), JavaScript runtimes (Node.js native TypeScript, Bun acquired by Anthropic, Deno v2), build tools (Vite v8 with Rolldown, Turbopack as Next.js default), TypeScript v6 and the upcoming Go-based compiler in v7, testing trends (Vitest, Playwright), meta-framework news (Next.js 16, Astro acquired by Cloudflare, Remix going React-free), and npm supply chain security incidents.

  25. 25
    Article
    Avatar of collectionsCollections·3w

    Bun v1.3.13: test isolation, 8x less memory for source maps, and faster gzip

    Bun v1.3.13 ships with notable performance gains and new test runner capabilities. Four new flags — --isolate, --parallel, --shard, and --changed — give developers finer control over test execution. Memory usage drops dramatically: bun install uses ~17x less memory by streaming tarballs to disk, and source maps consume 8x less memory. gzip compression is up to 5.5x faster via zlib-ng. New features include Range request support in Bun.serve(), SHA3 hash algorithms, and WebSocket unix socket schemes. The JavaScriptCore engine received 1,316 upstream commits, and 82 reported issues were closed including Node.js compatibility fixes and memory leak patches.