{product.title}
++ + {product.category} + +
+${product.price}
+{product.stock} in stock
+From 5e28873c889889fa5068b0b268f7d4c1bac2e432 Mon Sep 17 00:00:00 2001
From: monarcode
new URL()
- , so it runs on Hermes too. CI tests on Node.js 24.
+ , so it runs on Hermes too. CI runs it on Node.js 20 to 24,
+ Bun and Deno.
+ There's no such page. Back to the store +
+ ), + errorComponent: RouteError, +}); + +function CategoryPage() { + const { category } = categoryRoute.useParams(); + const { page } = categoryRoute.useLoaderDeps(); + const { products, total } = categoryRoute.useLoaderData(); + const pages = Math.max(1, Math.ceil(total / perPage)); + return ( + <> +No products here.
+ ) : ( +This product isn't in the store.
+ ), + errorComponent: RouteError, +}); + +function ProductPage() { + const product = productRoute.useLoaderData(); + return ( ++ + {product.category} + +
+${product.price}
+{product.stock} in stock
+There's no page here.
, +}); + +function Layout() { + return ( + <> +This page's address has a search param it can't read.
+ Back to the store +{describeError(error)}
+ +