import type { PageLoader, PageProps } from "@warlock.js/web";import { catalog } from "app/products/catalog";import ProductGrid from "./product-grid";
export const loader = (async () => ({ products: await catalog.list(),})) satisfies PageLoader;
export default function Products({ data }: PageProps<typeof loader>) { return <ProductGrid items={data.products} />;}A typed loader feeds the same React component on the server and in the browser. Routing, metadata, layouts, hydration, and navigation live in web.