niceui

React frameworks compared

React itself only renders components. A framework adds routing, data loading, rendering on the server and a build setup. Here's what the main options are good at, without the hype.

Updated · NiceUI

Next.js

The most widely used React framework. It offers file-based routing, React Server Components, static and server rendering, image optimisation and API routes in one package. Choose it for most production web apps, marketing sites with dynamic parts and anything that benefits from a large ecosystem.

React Router (framework mode)

Remix merged into React Router, which now has a framework mode with nested routes, loaders and actions for data, and server rendering. It stays close to web standards such as forms and fetch. Choose it if you like explicit data loading per route.

Astro

A content-first framework that ships zero JavaScript by default and hydrates only the interactive "islands", which can be React components. Choose it for blogs, docs and marketing sites where most of the page is static.

TanStack Start

A full-stack framework built on TanStack Router, with type-safe routing, server functions and streaming. Choose it if you want end-to-end type safety and already use TanStack Query or Router.

Vite (single-page app)

Not a framework, but the simplest way to run React: a fast dev server and a static build. Choose it for dashboards behind a login, internal tools and prototypes where SEO doesn't matter.

Expo (React Native)

For iOS and Android apps written in React, with file-based routing through Expo Router and an optional web target.

How to choose

  • Public site that must rank in search: Next.js or Astro.
  • App behind a login: Vite, React Router or Next.js.
  • Mostly content with some interactivity: Astro.
  • You want strict types from route to server: TanStack Start.
  • Mobile apps: Expo.

UI works in all of them

NiceUI components are plain React and Tailwind CSS, so they drop into any of these frameworks. Interactive components need a client boundary in Next.js ('use client') and a client directive in Astro (client:load).

FAQ

What is the best React framework?

For most production web apps, Next.js. For content-heavy sites, Astro. For apps behind a login, a Vite single-page app is often enough.

Is Remix still a thing?

Remix merged into React Router, so new projects use React Router's framework mode.

Do I need a framework to use React?

No. Vite gives you a fast React setup without one; add a framework when you need server rendering, routing conventions or data loading.

Keep reading