
Remix v2 Has a Free Framework That Makes React Server-Side Rendering Actually Enjoyable
Remix v2 ditches the file-based routing complexity of Next.js and gives you nested routes with built-in data loading. Every route is a server component by default. No client-side waterfalls. No loading spinners everywhere. What Changed in v2 Feature Remix v1 Remix v2 Routing file convention v1 flat routes (v2 convention) Dev server Custom Vite CSS Custom imports Vite CSS Meta Object Function Error boundary CatchBoundary + ErrorBoundary Single ErrorBoundary Quick Start npx create-remix@latest my-app cd my-app && npm run dev Nested Routes with Data Loading // app/routes/posts.$postId.tsx import type { LoaderFunctionArgs } from " @remix-run/node " import { json } from " @remix-run/node " import { useLoaderData } from " @remix-run/react " export async function loader ({ params }: LoaderFunctionArgs ) { const post = await db . post . findUnique ({ where : { id : params . postId } }) if ( ! post ) throw new Response ( " Not Found " , { status : 404 }) return json ({ post }) } export default
Continue reading on Dev.to React
Opens in a new tab


