How far can nested UI loaders go for UIs with list of components episode artwork

EPISODE · Sep 13, 2025 · 7 MIN

How far can nested UI loaders go for UIs with list of components

from The Call Kent Podcast · host Kent C. Dodds

the UI at https://nothing.tech/products/phone-3 renders a list of "widgets". I would like each of these widgets to have their own loaders to maximise page speed, furthermore I'd be able to "deeplink" a user straight into a widget. But how do I do that when a route can only have one Outlet? Here's an example with Promise.all. Before: // routes/dashboard.tsx export async function loader() { const user = await fetch('/api/user').then(r => r.json()) const projects = await fetch(`/api/projects?userId=${user.id}`).then(r => r.json()) const notifications = await fetch(`/api/notifications?userId=${user.id}`).then(r => r.json()) return { user, projects, notifications } } After: export async function loader() { const userPromise = fetch('/api/user').then(r => r.json()) const projectsPromise = userPromise.then(user => fetch(`/api/projects?userId=${user.id}`).then(r => r.json()) ) const notificationsPromise = userPromise.then(user => fetch(`/api/notifications?userId=${user.id}`).then(r => r.json()) ) const [user, projects, notifications] = await Promise.all([ userPromise, projectsPromise, notificationsPromise, ]) return { user, projects, notifications } } Kent's notes: I forgot that defer is now unnecessary, simply return an object from your loader and any properties on that object that are promises will be sent along as deferred data automatically. Learn more from the links below. Full Stack Components Streaming with Suspense React Router and React Server Components: The Path Forward promiseHash from remix-utils How far can nested UI loaders go for UIs with list of components

Episode metadata supplied by the publisher feed · Published Sep 13, 2025

Embed this episode

NOW PLAYING

How far can nested UI loaders go for UIs with list of components

0:00 7:37

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of The Call Kent Podcast?

This episode is 7 minutes long.

When was this The Call Kent Podcast episode published?

This episode was published on September 13, 2025.

Can I download this The Call Kent Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!