An ideal pattern to combine React Router with TanStack Query
If you use loaders in React Router and have them start XHR requests on the same QueryClient you use in your components, you can start API requests before you render the React page. This makes the page feel faster to load because you can have the back end data ready for your eyes to feast on sooner.