Remix · web framework

On this page 7

Remix is a full-stack web framework for React that renders pages on the server, loads data through route-level loaders, handles mutations through actions and relies on web platform standards such as HTML forms and the Fetch API. In web applications, it represents the server-first approach to React, in which the browser receives working HTML before any JavaScript runs.

Remix was created by the authors of React Router, released as open source in late 2021 and acquired by Shopify in 2022. In 2024 its framework features were merged into React Router v7, so the same ideas now ship under both names, which often confuses developers reading older documentation.

How Remix handles requests and data

Remix maps every URL to a tree of nested route modules, and each module can export a loader for reading data, an action for writing data and a React component for the user interface. On a request, the server runs the loaders of all matched routes in parallel, renders HTML and sends it with the data embedded, after which hydration makes the page interactive.

Mutations follow the HTML form model. A form posts to an action, the action changes data and returns a response, and Remix then revalidates the loaders on the page automatically. This removes most hand-written client caching and state synchronization, because the server remains the single source of truth.

The table below lists the route module exports that define how a Remix application behaves.

ExportRuns onPurpose
loaderServerReads data for a GET request
actionServerProcesses POST, PUT, PATCH or DELETE submissions
default componentServer and browserRenders the route user interface
meta and linksServer and browserSets title, meta tags and style sheets
ErrorBoundaryServer and browserRenders errors without breaking parent routes
Main exports of a Remix route module

Web standards and progressive enhancement in Remix

Remix builds on standard Request and Response objects instead of a framework-specific API. Loaders receive a Fetch API Request, return a Response or plain data, and use ordinary HTTP features such as status codes, headers and cookies, which makes knowledge transferable beyond the framework.

Caching follows the same principle. Instead of a proprietary data cache, a loader sets Cache-Control headers on its response, so browsers, CDNs and reverse proxies can store pages according to standard HTTP rules. Teams that already understand HTTP caching semantics can tune performance without learning a separate invalidation model, although they must design cache keys and personalized content carefully.

Progressive enhancement is a design goal rather than an afterthought. Because forms and links work as plain HTML, core flows such as sign-in or checkout keep working when JavaScript fails to load, and JavaScript then upgrades them with pending states, optimistic updates and client-side transitions.

Server adapters let the same code run on Node.js, Cloudflare Workers, Deno and other edge runtimes, because each adapter only translates the platform request into a standard Request.

Remix compared with other React frameworks

Remix differs from Next.js and similar frameworks mainly in its runtime data model. It favors server rendering on each request with HTTP caching, while Next.js offers static generation, incremental static regeneration and React Server Components as first-class options.

The following comparison highlights the practical differences.

ApproachData loadingRendering defaultTypical strength
RemixRoute loaders and actionsSSR per requestForms, mutations, resilience
Next.jsServer Components and fetchStatic or dynamic per routeBroad feature set, ecosystem
SPA with ViteClient fetch after loadClient-side renderingSimple hosting, rich interactivity
AstroBuild or request timeStatic HTML with islandsContent-heavy sites
Remix and related rendering approaches

Remix does not prescribe a database, an ORM or a styling solution. That minimal surface keeps the framework small, but teams must make more architectural choices themselves than in batteries-included stacks.

Versions and the move to React Router

Remix evolved quickly, and the version a project uses determines which documentation applies. Version 2 switched the build to Vite, and the next major step folded the framework into React Router as its framework mode.

MilestoneApproximate dateChange for developers
Remix v1 open sourceLate 2021Nested routes, loaders and actions
Shopify acquisition2022Corporate backing; Hydrogen builds on it
Remix v22023Vite-based build, refined conventions
React Router v7Late 2024Remix features become framework mode
Milestones in the evolution of Remix

For new React projects, the maintainers recommend starting with React Router v7 in framework mode, and existing Remix v2 applications follow an incremental upgrade path behind future flags. The maintainers have also announced a separate, future Remix line that departs from React, so the name may refer to different stacks over time.

Common mistakes when building with Remix

Most problems in Remix projects come from carrying single-page habits into a server-first framework. The table pairs typical symptoms with their causes and fixes.

SymptomCauseFix
Stale data after a saveMutation done with manual fetchSubmit through an action to trigger revalidation
Slow nested pagesSequential awaits in one loaderSplit data across routes or run requests concurrently
Secrets in browser bundleServer code imported into componentsKeep it in server-only modules
Whole page breaks on errorNo route error boundaryAdd an ErrorBoundary per route
Typical Remix pitfalls and fixes

A further risk is treating loaders as public APIs: every loader is reachable over HTTP, so authorization checks belong inside each loader and action, not only in the user interface.

In simple terms

Remix is a toolkit for building websites and online apps with React. Its main idea is that the server does most of the work: it gathers the information a page needs, builds the page and sends it ready to read.

Think of a restaurant that plates the meal in the kitchen instead of sending raw ingredients to your table. You can start eating at once, and the page still works even if extra scripts fail. Saving a form is just as simple, because the server stores the change and sends back a fresh page.

A practical example

An online shop for outdoor equipment rebuilds its checkout with Remix. Each step, from cart to shipping to payment confirmation, is a nested route with its own loader and action, and the address form posts to the server like a classic HTML form.

During a regional mobile network slowdown, analytics show that about one in fifty sessions loads the page before the JavaScript bundle arrives. Because the forms work without scripts, those customers still complete orders. The team also removes a client-side state library, since automatic revalidation keeps the cart consistent, and the checkout bundle shrinks noticeably.