React Router 6.4 introduced loaders


React Router 6.4 introduced loaders. The big idea: Fetch everything for the route in parallel.

What I've noticed: In most apps, each route has one component that handles fetching, and passes the data down to children via props.

Result? Loaders rarely improve performance.
Loaders are also clunky to use with React Query.

And since loaders rarely actually improve performance, I lean toward ignoring them.

So, if the loader isn't providing a perf benefit, I see no reason to use them.

Am I overlooking other benefits of React Router loaders?

View original on X