Advertisement Β· 728 Γ— 90

Posts by Pedro Cattori

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

3 months ago 0 0 0 0

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

4 months ago 4 0 1 0

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

4 months ago 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...

4 months ago 5 0 1 0
Video

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

8 months ago 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...

10 months ago 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

11 months ago 30 3 4 0
Advertisement

My new favorite thing to say to LLMs:

> What is the steelman argument against this approach?

1 year ago 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-...

1 year ago 43 3 0 0
Video

πŸ“½οΈ 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! πŸš€

1 year ago 202 38 5 5

s = second? no
s = season? yes

1 year ago 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...

1 year ago 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 πŸ“ˆ

1 year ago 55 1 2 0

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

1 year ago 3 0 0 0

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

1 year ago 6 0 1 0
Advertisement
Preview
Route Module Type Safety

Templates and docs have been updated to include `verbatimModuleSyntax`

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

1 year ago 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...

1 year ago 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

1 year ago 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...

1 year ago 12 0 2 0

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

1 year ago 0 0 1 0

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

1 year ago 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`

1 year ago 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

1 year ago 1 0 1 0
Advertisement
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...

1 year ago 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...

1 year ago 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...

1 year ago 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...

1 year ago 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...

1 year ago 5 0 1 0
Post image

Incremental migration paths are hard, but lint rules are harder

1 year ago 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...

1 year ago 13 0 0 0