Back to articles
Remix Has a Free API: Web Standards First, Framework Second

Remix Has a Free API: Web Standards First, Framework Second

via Dev.to WebdevAlex Spinov

Remix doesn't add abstractions on top of the web platform. It removes them. What Is Remix? Remix is a full-stack React framework that embraces web standards — Request, Response, FormData, Headers. Now part of React Router v7, it gives you nested routing with parallel data loading, SSR, progressive enhancement, and error boundaries. The Loader/Action Pattern // app/routes/posts.$id.tsx import { json } from " @remix-run/node " ; import { useLoaderData , Form } from " @remix-run/react " ; export async function loader ({ params }) { const post = await db . post . findUnique ({ where : { id : params . id } }); if ( ! post ) throw new Response ( " Not Found " , { status : 404 }); return json ({ post }); } export async function action ({ request , params }) { const formData = await request . formData (); await db . post . update ({ where : { id : params . id }, data : { title : formData . get ( " title " ) } }); return json ({ success : true }); } export default function Post () { const { pos

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles