Reflection — An Honest Take 8 min

Honest Take — Before You Begin

Next.js is the Rails of React. I mean this literally. Opinionated file-based routing. Built-in API routes. Server-side rendering by default. Image optimization, middleware, environment configuration -- batteries included. If Express felt like being dropped in the wilderness, Next.js feels like checking into a hotel. You will feel at home here, and that is both the strength and the trap. Do not mistake familiarity for understanding.

SSR, SSG, and ISR sound like new concepts, but you already know them under different names. Server-side rendering is what Rails does on every request -- render HTML, send it to the browser. Static site generation is rails generate for every page at build time, like a cached response that never expires. Incremental static regeneration is Russian doll caching with stale_while_revalidate -- serve the stale version, rebuild in the background, serve the fresh version next time. The concepts are identical. The vocabulary is different.

Here is where an integrator's mindset matters. Most React developers have never built a production Rails API. Most Rails developers have never built a production React frontend. You are building fluency in both worlds. The person who can design a Rails API that serves a Next.js frontend -- who understands serialization, caching headers, authentication flows, WebSocket connections across that boundary -- is the person companies pay staff-level salaries to.

The React Server Components model in Next.js 13+ blurs the line between server and client in ways that would have been heresy three years ago. Components that run on the server, fetch data directly from the database, and send only HTML to the client -- this is what Rails has always done, reimplemented inside React. The industry is slowly rediscovering that servers are good at serving. Your Rails background is an advantage here, not a liability.

Remix is worth knowing about as an alternative philosophy. Where Next.js adds features, Remix subtracts them and leans on web standards. Both are valid. Learn Next.js for jobs, study Remix for mental models.

Learning resources 6

That's the free preview. Sign in to continue this course.

Sign in to continue

New here? Make a desk →