
Remix Has a Free Full-Stack Framework That Uses Web Standards Instead of Hacks
Remix uses native browser APIs — forms, HTTP caching, request/response — instead of inventing new abstractions. The result: apps that work even without JavaScript. The Next.js Alternative Next.js invented its own data fetching (getServerSideProps → Server Components), its own caching (complex, often confusing), and its own routing patterns. Remix said: browsers already have great APIs for this. Let's use them. What You Get for Free Loaders (GET data): export async function loader ({ params }: LoaderFunctionArgs ) { const user = await db . user . findUnique ({ where : { id : params . id } }); if ( ! user ) throw new Response ( ' Not found ' , { status : 404 }); return json ( user ); } export default function UserPage () { const user = useLoaderData < typeof loader > (); return < h1 > { user . name } < /h1> ; } Actions (POST/PUT/DELETE): export async function action ({ request }: ActionFunctionArgs ) { const formData = await request . formData (); await db . user . create ({ data : { nam
Continue reading on Dev.to Webdev
Opens in a new tab




