> Remix Data Loading
Server-side data loading with Remix loaders, actions, and progressive enhancement.
fetch
$
curl "https://skillshub.wtf/skillshub-team/catalog-batch5/remix-loaders?format=md"SKILL.md•Remix Data Loading
Remix Data Loading
Loader (GET)
export async function loader({ params, request }: LoaderFunctionArgs) {
const url = new URL(request.url);
const page = Number(url.searchParams.get('page') || 1);
const posts = await db.post.findMany({ skip: (page - 1) * 10, take: 10 });
return json({ posts, page });
}
Action (POST/PUT/DELETE)
export async function action({ request }: ActionFunctionArgs) {
const form = await request.formData();
const intent = form.get('intent');
if (intent === 'delete') {
await db.post.delete({ where: { id: form.get('id') } });
} else {
await db.post.create({ data: { title: form.get('title') } });
}
return redirect('/posts');
}
Streaming & Deferred
export async function loader() {
return defer({ fast: await getFast(), slow: getSlow() }); // slow loads async
}
> related_skills --same-repo
> Nix Dev Shells with direnv
Auto-activate reproducible dev environments with Nix flakes and direnv.
> Dagger with GitHub Actions
Run Dagger CI/CD pipelines in GitHub Actions for portable, testable builds.
> Bun + Hono API
Build fast APIs with Bun runtime and Hono framework.
> Deno Fresh Framework
Build full-stack web apps with Fresh on Deno. Islands, routes, and zero runtime overhead.