Pedro Cattori's Avatar

Pedro Cattori

@pedrocattori.com

πŸ’Ώ @remix.run & @reactrouter.com at Shopify Do sufficiently smart compilers dream of electric sheep?

1,235
Followers
111
Following
36
Posts
03.11.2024
Joined
Posts Following

Latest posts by Pedro Cattori @pedrocattori.com

If I hadn't gotten Silksong earlier this year, this would have been crushing. Though still sad to see Metroid sink to such lows.

31.12.2025 01:17 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I just added a small section about React hooks to the post. Thanks for the idea @mastrojs.bsky.social

18.11.2025 23:24 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Yes, good point. Simple refactors like moving a hook into a conditional break things.

18.11.2025 22:10 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Just JavaScript If refactors break things, it ain't just JavaScript

Is Remix 3 "just JavaScript"? Yes.

But doesn't it use TS and JSX? Also yes.

πŸ“ Wrote a new post about what I think "just JavaScript" should mean. Or at least what it means to me.

pedrocattori.com/posts/just-j...

18.11.2025 19:14 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

Vite: The Documentary premieres October 9th at @viteconf.org in Amsterdam ⚑
youtu.be/46fe5AFc0tY

04.08.2025 16:40 πŸ‘ 128 πŸ” 29 πŸ’¬ 2 πŸ“Œ 6
Preview
Wake up, Remix! It's time to go wake up Remix! Here's what we're building and what it means for React Router.

Wake up, Remix!

remix.run/blog/wake-up...

28.05.2025 14:14 πŸ‘ 47 πŸ” 10 πŸ’¬ 4 πŸ“Œ 6
npmtrends showing react-router going from ~11M downloads/week in 1/2025 to ~16M downloads/week in 5/2025

npmtrends showing react-router going from ~11M downloads/week in 1/2025 to ~16M downloads/week in 5/2025

React Router going from 11M to 16M since the start of the year. Crazy that there's so much room for growth still!

Bringing all that Remix goodness to so many users feels so good

*ofc these are just trends, so don't read too much into the absolute numbers

12.05.2025 15:37 πŸ‘ 30 πŸ” 3 πŸ’¬ 4 πŸ“Œ 0

My new favorite thing to say to LLMs:

> What is the steelman argument against this approach?

10.04.2025 15:40 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
β€œJust use Vite”… with the Workers runtime The Cloudflare Vite plugin integrates Vite, one of the most popular build tools for web development, with the Workers runtime. Today, we are announcing the 1.0 release and official support for React R...

When Remix adopted Vite, there were 2 notable drawbacks:

1. Dev vs. prod differences with bundling
2. Dev only supported Node as first-class runtime

@rolldown.rs will solve (1), and now @vite.dev 's Env API has solved (2)!

blog.cloudflare.com/introducing-...

08.04.2025 14:20 πŸ‘ 43 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

πŸ“½οΈ From a radical rethink to the new standard in speed and simplicity, @vite.dev v has become the go-to tool for modern web development. Discover its story and the impact shaping the future of the web



The @vite.dev Documentary is coming soon!

Stay tuned for the release date! πŸš€

15.03.2025 17:44 πŸ‘ 202 πŸ” 38 πŸ’¬ 5 πŸ“Œ 5

s = second? no
s = season? yes

11.03.2025 18:07 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
GitHub - pcattori/babel-dead-code-elimination Contribute to pcattori/babel-dead-code-elimination development by creating an account on GitHub.

GitHub: github.com/pcattori/bab...

16.12.2024 21:11 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸš€ babel-dead-code-elimination v1.0.7 released!

Incredible growth so far with @tanstack.com as an early adopter and now React Router v7 uses it under the hood πŸ“ˆ

16.12.2024 21:11 πŸ‘ 55 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

Or as @markdalgleish.com would say: They architecture astronauted

06.12.2024 22:14 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Tired: They over-abstracted and overcomplicated their solution
Wired: They cooked too close to the sun

06.12.2024 22:12 πŸ‘ 6 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Route Module Type Safety

Templates and docs have been updated to include `verbatimModuleSyntax`

reactrouter.com/how-to/route...

05.12.2024 13:03 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
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.

`verbatimModuleSyntax` automatically enables `isolatedModules`, so you don't need to explicitly set that anymore

www.typescriptlang.org/tsconfig/#is...

05.12.2024 13:03 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

If you got on React Router v7 early, make sure you try out verbatimModuleSyntax in your tsconfig!

It'll automatically add `type` modifier when auto-importing generated types like `Route` and its what we recommend now

05.12.2024 13:03 πŸ‘ 46 πŸ” 5 πŸ’¬ 1 πŸ“Œ 0

Comments like this make it all worth it!

Already have improvements and simplifications to the type-safety lined up for upcoming v7.x releases πŸ’ͺ

bsky.app/profile/john...

04.12.2024 02:58 πŸ‘ 12 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

Yea pretty sure that would also work, but adding an explicit 404 fallback route seems more idiomatic to me

26.11.2024 22:00 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Sure you can add a route whose path is just `*?` and that will be the fallback route

26.11.2024 19:47 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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`

26.11.2024 19:40 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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

26.11.2024 19:24 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Type safety in React Router v7
Type safety in React Router v7 YouTube video by Pedro Cattori

Quick demo of the new type safety in React Router v7!
Vastly improved over what we had in Remix v2

www.youtube.com/watch?v=u9r9...

26.11.2024 17:32 πŸ‘ 49 πŸ” 8 πŸ’¬ 3 πŸ“Œ 4

Every week I get more validation that moving Remix (now React Router) onto @vite.dev was a good idea.

This week is no different!

bsky.app/profile/rphl...

25.11.2024 21:57 πŸ‘ 43 πŸ” 4 πŸ’¬ 0 πŸ“Œ 0

πŸ’― This is exactly why I designed React Router's `typegen` command to be used in tandem with `tsc` and didn't just hardcode typegen into `react-router build`

bsky.app/profile/josh...

25.11.2024 20:30 πŸ‘ 7 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
React Router v7 React Router v7 brings all the great things you love from Remix back to React Router

React Router v7 is finally here!

Lots of good stuff, but I'm most excited to show off the new type safety features.

Just got a greenscreen 🟩 so I don't have any excuses not to make some demo videos!

remix.run/blog/react-r...

22.11.2024 23:45 πŸ‘ 61 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

πŸ’― plus interop with eslint was a big issue too

For anyone interested, I wrote up a decision doc about this!

github.com/remix-run/re...

19.11.2024 15:05 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Incremental migration paths are hard, but lint rules are harder

18.11.2024 16:48 πŸ‘ 9 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
typegen: parent routes by pcattori Β· Pull Request #12282 Β· remix-run/react-router As an example, this drastically improves typesafety for matches in meta. Previously (see #12278), you needed to cast each match. Now matches automatically knows the parent routes for each route, al...

Just landed the first set of parent-route-aware types for React Router v7 . More to come (`useMatches`, `<Link to />` etc..), but the ease of adding this feature is great validation of our typegen approach.

github.com/remix-run/re...

14.11.2024 23:54 πŸ‘ 13 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0