DEV Community

Alex Spinov
Alex Spinov

Posted on

Remix v2 Has a Free Full-Stack React Framework — Nested Routes and Zero-Config Server Actions

Why Remix v2?

Full-stack React with web standards — Fetch API, FormData, HTTP caching natively.

npx create-remix@latest my-app
Enter fullscreen mode Exit fullscreen mode

Nested Routes

app/routes/
  _index.tsx -> /
  dashboard.tsx -> layout
  dashboard.settings.tsx -> /dashboard/settings
  blog.$slug.tsx -> /blog/:slug
Enter fullscreen mode Exit fullscreen mode

Server Loaders

export async function loader({ params }) {
  const post = await db.post.findUnique({ where: { slug: params.slug } })
  if (!post) throw new Response("Not Found", { status: 404 })
  return json(post)
}
Enter fullscreen mode Exit fullscreen mode

Server Actions (No fetch, No useState)

export async function action({ request }) {
  const form = await request.formData()
  await db.post.create({ data: { title: form.get("title") } })
  return redirect("/blog")
}
Enter fullscreen mode Exit fullscreen mode

HTML forms that work without JavaScript.

Feature Remix Next.js
Mutations Forms Server Actions
Standards Native Custom
Bundle Smaller Larger

Need to extract data from any website at scale? I build custom web scrapers — 77 production scrapers running on Apify Store. Email me at spinov001@gmail.com for a tailored solution.

Top comments (0)