JavaScript Jabber cover image

React Server Components: Part 1 - JSJ 582

JavaScript Jabber

00:00

How to Avoid a Recursive Promise

The only option is that the server has to know after I finish fetching this one query in the parent component, I'm going to have to go and execute these next async functions in the client. So ideally you want, you would have wanted to wait on those two pieces of data in parallel. There isn't a JavaScript solution given that there's user code running in between the data fetches. It's just that if you want to avoid those waterfalls, you have to move all the appropriate logic to the server or else, yeah, there's no way around it.

Play episode from 44:02
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app