Skip to main contentArrow Right

This tutorial was written by Sebastian Nilsson, a expert in C#, ASP.NET, and Azure, with a passion for the web and JavaScript. Connect with him on his website to see more of his work!


Anyone who’s worked with React knows it’s easy to get started with, and you can quickly become quite productive. However, once you move beyond the basics and need full-stack capabilities, like server-side rendering (SSR), selecting a React framework becomes the next step. Two of the most popular frameworks are Next.js and Remix. Both provide powerful tools to build high-performance web applications, but their philosophies and approaches differ.

This article compares Next.js and Remix, helping you get to know both frameworks, including their key concepts, features, architecture, performance capabilities, learning curves, and use cases. By the end, you’ll have a solid understanding of how these frameworks stack up against each other and, hopefully, a firm base for choosing the right framework for your specific needs and ways of solving problems.

This comparison reflects the state of Next.js at version 14 and Remix at version 2.

Next.js overview

Next.js was developed by Vercel and was launched in 2016. It has since become one of the most widely used frameworks in the React ecosystem. Next.js is known for its flexibility and extensive feature set. It’s built to solve the complexities of SSR and static site generation (SSG), as well as easily handle routing, expose API endpoints, and optimize performance for the end user.

Here are some key features of Next.js:

Large companies frequently use Next.js for e-commerce, content-heavy websites, and sometimes enterprise-grade applications. Notable users include Twitch, Hulu, TikTok, Spotify, and Sonos.

Remix overview

Remix was developed by the creators of React Router and was released in 2021. It’s built on top of the React Router. The framework is a newer entry to the React ecosystem. It focuses on web standards, performance, and a full-stack data flow, giving the developer a very high level of control.

While Remix also supports SSR, it takes a different approach from Next.js, prioritizing progressive enhancement and fine-grained control over data loading and mutations.

Remix offers the following key features:

  • Loader and action functions efficiently handle server-side data fetching and mutations, avoiding unnecessary JavaScript on the client.

  • Nested routes are optimized for both layout and data loading, making it easy to build complex user interfaces.

  • Streaming support enables fast content delivery through streaming HTML directly to the browser.

  • Web standards focus means Remix emphasizes built-in browser APIs over proprietary abstractions.

Remix is ideal for projects where you want to squeeze out the maximum possible performance from your server-side React solution and want to have a very high level of control in your React application. Some companies that have adopted Remix include ChatGPT, Shopify Hydrogen, and Docker Scout.

Next.js core concepts

At its core, Next.js is designed to simplify SSR and SSG through a file-based routing system. The framework allows developers to build pages by creating files in the app directory. Placing a page.ts|js file in a folder named about enables the Next.js app to show a page when you navigate to the /about URL. This routing method allows you to easily view the project’s file structure to see which pages and APIs are routed within the app. It’s a straightforward approach that feels familiar to React developers.

Pre-rendering is one of the standout Next.js features, giving developers a choice between SSG, which generates HTML at build time, and SSR, which renders HTML on each request. With ISR, Next.js can also regenerate specific pages after a certain interval, allowing static pages to be updated, behind the scenes, without a full rebuild.

Remix core concepts

Remix uses file-based routing as its conventional route configuration. But Remix also allows manual route configuration for scenarios that the file-based routing isn’t flexible enough to cover. On top of this, Remix has a nested routing architecture, which enables seamless data fetching and UI composition.

The framework introduces loader and action functions for each route, where loaders handle data fetching and actions manage form submissions and mutations. This approach decouples the frontend and backend logic, ensuring that the right data is always available without duplicating code across the stack.

Remix excels in delivering optimized and performant user experiences, particularly through its streaming capabilities, which allow pages to load incrementally as data becomes available, significantly improving perceived performance for users.

Boilerplate Next.js

To get started with Next.js, all you have to do is run npx create-next-app@latest and answer some configuration questions for your setup.

The layout file, which defines the shared layout and content for your entire website, is located at /app/layout.tsx. In its simplest form, it looks like this:

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

In this file, the standard React children prop is used to define where the page content will be rendered within the layout. To display a page, you need to add a file at /app/page.tsx with the following content:

export default function Page() {
  return <div>This is the page content</div>
}

Following the routing convention in Next.js, if you want an about page on your website under the URL https://example.com/about, you need to add a page file under /app/about/page.tsx.

Boilerplate Remix

To get started with Remix, simply run npx create-remix@latest to set up a new app.

This generates several files, including /app/root.tsx, which serves as the site’s layout:

export function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

export default function App() {
  return <Outlet />;
}

Unlike Next.js, it uses an explicit export to follow React standards rather than relying on conventions.

The root page route is located at /app/routes/_index.tsx and contains the following:

export default function Index() {
  return <div>This is the page content</div>
}

To add an about page in Remix, you add a new file under the path /app/routes/about.tsx.

As you can see, the basic functionality is very similar across the frameworks. It’s when you get into more detailed functionality that they start diverging.

Next.js performance features

Next.js offers a range of performance optimization features that are intended to help the developer get a high level of performance by default. The features include SSG, SSR, and ISR, which provide flexibility in how content is rendered.

SSG lets you pre-render the whole site into a static web application, resulting in faster loading times. SSR allows custom content to be dynamically served from the server, which provides a seamless experience when navigating the site quickly as a user. This is the same functionality that ensures that search engines get the expected content directly for good search engine optimization (SEO). ISR enables cached content to be served instantly while simultaneously being updated in the background for the following users.

Its image optimization feature automatically adjusts images for the device and screen size, improving load times. Additionally, automatic code-splitting and script optimization make sure that only the necessary JavaScript is loaded on the page.

Edge rendering was also introduced a few versions back as an experimental feature in version 12.2. This allows specific (or all) pages or API routes to be served from geographically distributed edge locations closer to the end user. This also further boosts speed and reduces latency.

From a developer experience perspective, it’s worth noting that Next.js was built using webpack for bundling, which has struggled to maintain performance. Therefore, when changing something in the code, reload times can be very slow. For this reason, the Next.js team has been working on getting full compatibility on its own bundler, Turbopack. As of Next.js 14, Turbopack is still considered beta but is much faster than the default experience with webpack.

Remix performance features

Remix is focused on data efficiency and page load speed. The use of loader functions helps to load only the data required for a specific page or API endpoint. This ensures that the data is fetched server-side and eliminates the need for client-side fetching once the page has been rendered. Remix also offers streaming HTML, meaning users can start interacting with content while individual parts of the page continue loading as fast as possible in the background.

Remix avoids client-side JavaScript for form submissions, relying instead on server-side logic. This reduces the overall JavaScript bundle size and improves performance. It also means that the basic functionality of posting a form, with fields and a submit button, can even work on a browser with JavaScript disabled.

Remix also supports serving content from the edge. Since the Remix documentation site is hosted on Fly.io, it achieves time to first byte (TTFB) under one hundred milliseconds, and updates to the site take only a couple of minutes.

Remix supports the bundler Vite, which gives a remarkably fast developer experience. Remix reported that its Hot Module Replacement (HMR) became ten times faster using Vite, for example. Vite will become the default compiler of Remix in the future.

Next.js learning curve

Next.js provides a fairly gentle learning curve, especially for developers already familiar with React. The Next.js teams make it a point to be transparent in that they try to work closely with the React team.

Starting a project with create-next-app is straightforward, and the framework’s file-based routing system feels intuitive to most. Simply run npx create-next-app@latest and follow the wizard to have a working project up in no time.

With extensive documentation and a large community, developers have plenty of resources to get started quickly. However, advanced features like ISR and edge rendering can introduce complexity.

Next.js aims to provide good defaults for most choices—such as routing, SSR, data fetching, CSS handling, and much more—that have to be made when starting a project in just vanilla React. However, it has a history of changing defaults, and the community has expressed some frustration—particularly on Reddit—about more fine-grained feature control being unintuitive or even impossible.

Remix learning curve

Remix architecture requires developers to learn new patterns, particularly involving nested routing and loader/action functions.

Remix also has an intuitive CLI called create-remix that allows you to quickly create a new Remix app. You simply run npx create-remix@latest to get started.

Unlike typical React applications that rely heavily on client-side JavaScript to handle forms and data mutations, Remix uses its routing and loader/action functions to handle as much as possible on the server side. While this approach can result in more efficient apps, it introduces a steeper learning curve.

Given that Remix is a newer framework, it has a smaller community and newer documentation, resulting in fewer resources online for learning Remix compared to Next.js.

Next.js ecosystem

Next.js is developed by Vercel, which also provides deployment and hosting for multiple JavaScript frameworks. Given that Next.js is one of Vercel’s main frameworks, it’s no surprise that the Next.js experience on Vercel is seamless and easy. Vercel detects that the repository contains a Next.js app. Then Vercel takes care of all configurations for the deployment and makes sure the app just works and is available on the internet.

The framework has strong support for integrations with content management systems (CMS), headless e-commerce, and popular third-party services. The wide range of Next.js libraries means you can easily extend its functionality. There is also a whole Vercel Marketplace for integrations.

Remix ecosystem

Remix takes a more minimalist approach, emphasizing web fundamentals over proprietary tools. It encourages using built-in browser APIs and traditional React libraries, allowing developers to build apps without needing Remix-specific integrations. This means that anyone who builds libraries or parts of their solution in plain React can easily plug it into Remix, without worrying about framework-specific quirks or special considerations based on where the Remix application is hosted.

Although the Remix ecosystem is smaller, its focus on standard web technologies ensures long-term compatibility and flexibility as the ecosystem grows. Remix relies on the community to build the resources in the ecosystem over time.

Use cases

As mentioned, Next.js is used by many large organizations, such as Twitch, Hulu, TikTok, Spotify, and Sonos. It handles everything from marketing sites to large, composable commerce platforms for e-commerce and even web applications running server-side functionality, single-page application (SPA) functionality, or a combination of both. It’s a good fit for projects that require scalability, SEO optimization, and real-time content updates with ISR.

Remix also has some strong brands using its framework, such as Shopify, Docker, and even the NASA General Coordinates Network (GCN) site. The Remix framework really shines in scenarios where performance and the following fast user experience are critical. Its approach to data loading and form handling is especially useful for projects that need fast, interactive user interfaces and seamless transitions. Similar to Next.js, it also supports a mix of server-side and SPA functionality, as well as robust SEO optimization.

Choosing the right framework

There are many things to consider when deciding whether you should use Next.js or Remix for your project. As is often the case with technology comparisons, there is no clear winner. The decision depends on your specific scenario and needs.

Next.js strengths

Here are some of the Next.js strengths:

Next.js weaknesses

Here are some of the Next.js weaknesses:

  • Complexity: Next.js offers many advanced features related to updating data displayed in its apps, like ISR, data revalidation, and automatic caching on data fetching. However, understanding and using these features may require significant time and effort. For example, implementing ISR effectively can be difficult for dynamic content-heavy sites.

  • Performance in larger applications: As the amount of data and number of pages in your solution grow, so do the build time and performance requirements for hosting. Prebuilding many pages takes more build time. If you revalidate a lot of data on a lot of pages, this requires significant resources on your server, potentially driving up costs.

Remix strengths

Here are some of Remix’s strengths:

  • Performance-focused: Fine-tuned control over data loading and streaming improves both speed and user experience.

  • Simplified form handling: Built-in form submissions without JavaScript reduce the need for complex state management and unnecessary client-side scripts.

Remix weaknesses

Here are some of Remix’s weaknesses:

  • Smaller ecosystem: Remix has fewer integrations and community resources compared to Next.js.

  • Steeper learning curve: Developers familiar with standard React patterns may find the unique architecture of Remix harder to grasp initially.

Other considerations

There are some more points to take into consideration for an informed decision on which framework to choose. These points relate more to the long-term success of a project than the previously mentioned strengths and weaknesses, which are more related to how quickly you can pick up the framework and be productive.

SEO is critical for the organic growth and spread of any public website today. When it comes to SEO, both frameworks support robust SEO by allowing you to set metadata related to SEO and render the pages’ content server-side. This means that Google and other search engines get the pages’ full content and don’t have to wait for content to appear step-by-step, which is usually the experience in an SPA.

Performance is an important factor to SEO since Google, and other search engines, use how fast a site shows its pages as a factor to score the website. When it comes to this topic, Next.js probably has a slight edge with SSG and ISR, which allow fast delivery and timely updates of heavily cached content.

For complex routing scenarios, Remix has an edge over Next.js, given that Remix has file-based routing, which is very similar to Next.js. Remix also supports manual route configurations to cover more complex scenarios.

Comparison overview

For an overview of the comparison between the frameworks, we can look at the features in table format. This shows that there are only slight differences between these two very competent frameworks.


Next.js

Remix

Performance

⭐⭐

⭐⭐⭐

Power of routing

⭐⭐

⭐⭐⭐

Size of ecosystem

⭐⭐⭐

⭐⭐

Ease of learning

⭐⭐⭐

⭐⭐

SEO

⭐⭐⭐

⭐⭐⭐

One of the most important factors to consider when choosing any technology is the skill level and experience of your team relative to the complexity and learning curve of the tool. In this case, it’s important to gauge what your team’s prior experience of SSR is of React components, which type of routing they’ve used previously if they’re used to working with web standards, and how much they’ve kept up with the bleeding-edge features of modern versions of React.

If your team’s experience with SSR is limited, then both frameworks will require a shift in mindset. If they’re used to the React Router, then the Remix routing approach might be more intuitive. If they’ve been keeping up with the latest patterns, such as React.Suspense, then the patterns in Next.js might be more intuitive.

Conclusion

This article explored the core features, performance features, learning curves, and use cases for both Next.js and Remix. While Next.js provides a robust and flexible toolkit for developers to get started quickly, Remix offers a performance-first approach with a unique take on routing and data management. The decision between the two frameworks ultimately depends on the needs of your project and the skills and experience of your development team.

No matter which framework you choose, any modern web application needs to give the user a unique experience based on who they are. This can be a complex and quite time-consuming problem to handle on your own.

Descope is a service that offers a unique solution through its no-code/low-code visual workflows, allowing developers to quickly create and customize authentication flows without writing extensive code or disrupting the app’s architecture. With a strong focus on passwordless authentication—including methods like magic links, one-time passwords (OTPs), and passkeys—Descope not only simplifies the implementation of secure user management but also enhances user experience.

For more framework comparisons and authentication trends, subscribe to our blog or follow us on LinkedIn and Bluesky.