github remix-run/remix remix@3.4.0
remix v3.4.0

latest release: ui@0.15.0
one hour ago

Minor Changes

  • Render children into the document body or a custom container with the new Portal component from remix/component. In server-rendered apps, portals must be nested within a client entry to render their content. Standalone createRoot() apps that don't use Portal or Frame don't download its renderer. (#12344)

  • Deprecated remix/data-table/sql-helpers. Custom adapters can continue importing from this path until Data Table removes it in its next major release. The new @remix-run/data-table/internal/sql-helpers entry point is reserved for the built-in adapters. (#12497)

  • remix/router now treats request.signal cooperatively. When a request aborts, the router stops running middleware and handlers and rejects with the abort reason, but it waits for work already in progress instead of rejecting immediately. Pass context.request.signal to work that should stop when the client disconnects, such as fetch() calls and database queries. See the @remix-run/fetch-router changelog for details. (#12446)

  • Start Node.js HTTP and HTTPS servers with graceful shutdown and connection draining using serve() from remix/node-fetch-server, modeled after Bun.serve(). Call server.stop() to wait for in-flight requests to finish while closing idle and speculative connections, or server.stop(true) to close all active connections immediately. (#12491)

  • Deprecated limits.maxMatchWork in MatcherOptions (MatcherLimits.maxMatchWork) from remix/route-pattern. Rely on the built-in match work safeguard instead of configuring maxMatchWork; passing it continues to work in 3.x and will be removed in a future major release. (#12499)

Patch Changes

  • remix now declares Bun 1.4.3 as its minimum supported Bun version in engines. Upgrade Bun to 1.4.3 or later before updating if you run Remix on Bun. (#12367)

  • Updates to apps created with remix new: (#12499)

    • server.ts now uses serve() from remix/node-fetch-server, closing idle and speculative connections immediately on SIGINT or SIGTERM and draining active production requests for up to 30 seconds before shutting down.
    • hmr.ts reports HMR port conflicts without starting the app server, avoiding secondary EPIPE errors.
    • The starter welcome page moves inline SVGs into public/, simplifies the starter CSS and PromptButton component, clarifies AGENTS.md, and updates the bundled Remix agent skill with modern browser UI guidance.

    See the @remix-run/cli changelog for details and the hmr.ts diff to apply the port-conflict fix to an existing app.

  • Rendering, hydration, and navigation fixes in remix/component: (#12441)

    • Client navigations send the page being left as the Referer, so servers that redirect back after a form post return to the right page. Links with an explicit referrerpolicy and links or forms with rel="noreferrer" use native document navigation.
    • Frame form submissions keep the submit button's name and value when the button is disabled or removed during submission, including in Firefox.
    • Back and Forward restore scroll positions more reliably in Safari and Firefox when the destination takes time to load.
    • Reordering elements keeps focus, iframe documents, CSS animations, and open dialogs and popovers intact in browsers that support moveBefore(). Custom elements that define connectedMoveCallback() receive it for these moves, and frame reloads that reorder surviving client entries or nested frames preserve input focus and selection.
    • clientEntry() components passed as props or children to another clientEntry() now hydrate as independent client boundaries, keep their state and event handlers across outer updates and frame reloads, and load dynamically when rendered later on the client (such as inside closed dialogs or portals).
    • Components nested inside clientEntry() props can now read context from a provider in the same props or from handle.context.set() on the client entry itself during server rendering.
    • css() emits descriptor and definition at-rules (@property, @font-face, @counter-style, @font-palette-values, @page, @position-try) outside the generated class instead of dropping them, and renders object-valued nested selector keys that do not start with &, @, :, ., or [ (such as h2 or 'ul:hover &') as nested rules instead of [object Object].
    • Controls disabled in server HTML with disabled="" stay disabled after hydration, and an element that replaces a hydrated empty string renders in the right position.
    • Inputs that render again with value={undefined} or checked={undefined} keep what the visitor typed or toggled.
    • Streamed child frames show their content as soon as it arrives, and a frame waiting for preloads no longer stays on its server HTML when a sibling finishes first.

    See the @remix-run/component changelog for the complete list.

  • Client hydration and rendering in remix/component are faster, with no changes to app code. In our 4x CPU-throttled Chromium benchmarks, hydration is 2.1x–2.8x faster and client list and dashboard updates do 15%–30% less scripting work while preserving mismatch patching and DOM behavior. See the @remix-run/component changelog for details. (#12465)

  • The remix/component browser runtime is smaller, with no changes to app code. In our measurements, a minimal createRoot() app is about 40% smaller minified and gzipped, and an app that hydrates with run() is about 10% smaller. Standalone roots and navigation helpers such as navigate() only load the code for the features they import, apps served unbundled by remix/assets make fewer module requests, and list, frame, and hydration updates do less work. See the @remix-run/component changelog for details. (#12441)

  • Server rendering with remix/component/server (renderToString() and renderToStream()), remix/middleware/render, and remix/response/html is faster and uses less memory, with no changes to app code. In our benchmarks on Node 24, renderToString() throughput improves 2.4x–6.7x and renderToStream() improves 1.1x–5.4x while producing identical HTML output, and streamed HTML responses avoid extra wrapper streams and forward stream cancellation to the underlying reader. See the @remix-run/component, @remix-run/render-middleware, and @remix-run/response changelogs for details. (#12457)

  • SVG xlinkHref and xlink:href props in remix/component now render as the SVG2 href attribute instead of the namespaced xlink:href attribute. Other xlink props, such as xlinkTitle, are unchanged. Update any CSS selectors, tests, or scripts that look for xlink:href in rendered SVG. (#12441)

  • Development and asset pipeline improvements in remix/assets, remix/component-hmr, and remix/node-hmr: (#12441)

    • remix/assets compiles scripts and styles faster, bounds emitted script and style caches and releases intermediate state when watch is false, avoids spawning a duplicate file watcher under active browser HMR, and includes Content-Length on 200/HEAD responses and Cache-Control on 304 responses.
    • Full-page HMR reloads in WebKit no longer render stale JavaScript after a module was preloaded, and idle browser HMR streams in remix/node-hmr send heartbeats every 30 seconds so HTTP clients and proxies do not time them out.
    • Component HMR handles default and destructured parameters, nested declarations, assignments during render, and components that share a variable declaration with other exports. Editing the setup of a component without retained setup bindings or parameters no longer runs its setup twice, and failed edits that throw or reject a top-level await keep the last working component implementation.
    • Source maps account for injected HMR setup code and component HMR transforms, and explicitly unmapped generated code no longer points at the preceding authored source after loader transforms or minification.

    See the @remix-run/assets, @remix-run/component-hmr, and @remix-run/node-hmr changelogs for details.

  • Other fixes and improvements: (#12441)

    • compressResponse() from remix/response/compress and the compression() middleware from remix/middleware/compression no longer buffer the entire compressed response in memory when the client reads slowly.
    • detectMimeType() and detectContentType() from remix/mime no longer throw for extensions that match inherited object properties, such as file.constructor.
    • object() and record() from remix/data-schema no longer omit keys that passed validation from their results, and exporting object() schemas without an explicit type annotation no longer fails TypeScript declaration emit (TS2883 / TS4023).
    • LazyBlob and LazyFile from remix/lazy-file can be read in supported browsers without native ReadableStream async iteration, including Chrome and Edge 123 and Safari 17.5.
    • createFetchProxy() from remix/fetch-proxy removes connection-specific headers (including fields named by Connection) from upstream responses, and remix/node-fetch-server omits connection-specific headers on HTTP/2 responses while logging write failures and closing affected responses when an error response cannot be sent.
    • remix/multipart-parser speeds up boundary search on Bun and runtimes without Buffer, reduces per-upload setup work, speeds up parsing when part headers span multiple chunks, and handles headers at maxHeaderSize consistently across chunk boundaries.
  • SuperHeaders from remix/headers no longer wraps parsed header values in a Proxy, improving read and mutation throughput and returning real class instances for collection headers (Accept, AcceptEncoding, AcceptLanguage, Cookie, and Vary). Mutations that relied on Proxy traps—delete and Object.defineProperty() on typed fields, direct bracket-index assignment or .length truncation on list accessors (setCookie, ifMatch.tags, ifNoneMatch.tags, range.ranges), and own-property enumeration (Object.keys(), object spread, JSON.stringify()) on SuperHeaders property wrappers—are no longer intercepted. Assign undefined to clear typed fields and use standard array methods on list accessors: (#12499)

    -delete headers.contentType.charset
    -headers.setCookie[1] = { name: 'lang', value: 'en' }
    +headers.contentType.charset = undefined
    +headers.setCookie.splice(1, 1, { name: 'lang', value: 'en' })

    See the @remix-run/headers changelog for details.

  • The installed node_modules/remix/INDEX.md guide table now lists each guide's ## section headings with line ranges so readers and coding agents can jump directly to the relevant section of a guide. (#12478)

  • Stricter handling of untrusted input. Each of these rejects values that were previously accepted: (#12441)

    • remix/node-fetch-server responds with 400 Bad Request to requests with a literal backslash in the URL path. Percent-encoded backslashes are still accepted.
    • createHref() from remix/route-pattern/href, and the href() method of routes from remix/routes, throw a CreateHrefError when a pathname variable produces a standalone . or .. segment, which could otherwise resolve to a different route.
    • bigint() from remix/data-schema/coerce fails validation for strings longer than 4,096 characters.
  • Stop loadModule() from remix/node-tsx/load-module and remix test --coverage from printing a module.register() deprecation warning (DEP0205) on Node.js 26. Both now register synchronous in-thread hooks with module.registerHooks(). See the @remix-run/node-tsx and @remix-run/test changelogs for details. (#12466)

  • Request and response handling in remix/node-fetch-server (createRequestListener(), createRequest(), and sendResponse()) has higher throughput and lower per-request overhead. As part of this change, sendResponse() no longer releases its reader lock on the consumed response.body stream, bodyless HTTP/1.x requests (Content-Length: 0 or neither Content-Length nor Transfer-Encoding) now leave request.body as null instead of an empty stream, and createRequestListener() always constructs and passes a Request to zero-argument or rest-parameter handlers while routing their errors through onError. See the @remix-run/node-fetch-server changelog for details. (#12466)

  • remix/router dispatches requests significantly faster, especially for static routes and middleware chains, and remix/route-pattern matches large route tables 20 to 60 times faster, builds matchers 5 to 9 times faster, and generates hrefs up to nearly twice as fast in our benchmarks. Routing behavior is unchanged. See the @remix-run/fetch-router and @remix-run/route-pattern changelogs for details. (#12441)

  • Browser tests in remix/test run faster by reusing compiled scripts across test files. Firefox runs each test file in a top-level window so Back and Forward navigations behave as they do in the browser, and WebKit runs recover from the browser's history quota instead of failing later test files. See the @remix-run/test changelog for details. (#12441)

  • Bumped @remix-run/* dependencies:

Don't miss a new remix release

NewReleases is sending notifications on new releases.