Pedro Cattori
banner
pedrocattori.com
Pedro Cattori
@pedrocattori.com
💿 @remix.run & @reactrouter.com at Shopify

Do sufficiently smart compilers dream of electric sheep?
I just added a small section about React hooks to the post. Thanks for the idea @mastrojs.bsky.social
November 18, 2025 at 11:24 PM
Yes, good point. Simple refactors like moving a hook into a conditional break things.
November 18, 2025 at 10:10 PM
s = second? no
s = season? yes
March 11, 2025 at 6:07 PM
Or as @markdalgleish.com would say: They architecture astronauted
December 6, 2024 at 10:14 PM
Templates and docs have been updated to include `verbatimModuleSyntax`

reactrouter.com/how-to/route...
Route Module Type Safety
reactrouter.com
December 5, 2024 at 1:03 PM
`verbatimModuleSyntax` automatically enables `isolatedModules`, so you don't need to explicitly set that anymore

www.typescriptlang.org/tsconfig/#is...
TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
www.typescriptlang.org
December 5, 2024 at 1:03 PM
Yea pretty sure that would also work, but adding an explicit 404 fallback route seems more idiomatic to me
November 26, 2024 at 10:00 PM
Sure you can add a route whose path is just `*?` and that will be the fallback route
November 26, 2024 at 7:47 PM
If its missing, the router would route you to that page since `routes.ts` says "only route `products/:id` stuff to `product.tsx`.

You'd need a separate route for `products` if you wanted to handle missing `:id`
November 26, 2024 at 7:40 PM
If you wanted optional `id` param, it'd be encoded as `products/:id?` (with the `?`) in `routes.ts` OR with `products.($id)` if using flat routes
November 26, 2024 at 7:24 PM