Skip to main content

Parallel vs. Sequential Fetching

When multiple <Await> components render at the same time, their stores fire requests in parallel automatically. No configuration needed — if two stores both need data, both requests go out at once.

Need sequential fetching? Nest your <Await> components:

<Await store={userStore}>
{(user) => <Await store={postsStore}>{(posts) => <Profile user={user} posts={posts} />}</Await>}
</Await>

The inner <Await> won't render (or fetch) until the outer one has data.

For the common case of "fetch both, wait for both," use RemoteDataStore.all() instead — it's parallel, type-safe, and gives you a single <Await> with a tuple of results. See Combining Stores.