Skip to content
masterclass BuddyTech Buzz

One Slow Vendor API Was Blocking Our Entire Seller Dashboard

Learn to stream independent sections of a Next.js page with Suspense and use() so one slow call never blocks the rest.

MCB Editorial

9 min read ·

New story

Listen to this story

1 min preview

Learning Objectives & Key Takeaways

0 / 4 Completed
Architecture Ready
100%
What you will learn
  1. Start async requests in a Server Component before rendering the rest of the tree.
  2. Pass the Promise, not the awaited value, down to a Client Component as a prop.
  3. Call use(promise) inside a 'use client' file to unwrap it during render.
  4. Give each independent data source its own Suspense boundary so they stream separately.
  5. Use loading.tsx for whole-segment loading and explicit Suspense for one slow widget.

The Seller Dashboard That Froze on One Slow Widget

Our marketplace seller dashboard had five widgets: orders, inventory, payouts, reviews, and a third-party fraud-risk score pulled from an external vendor API. On a normal day the page loaded in under a second. On the day the vendor's API started timing out, every seller staring at a blank white screen for six seconds before anything appeared, including the orders list that had nothing to do with the vendor at all.

The root cause was structural, not a bug in any single widget. The page was a single Server Component that awaited all five data sources before returning any HTML. Because fetch calls were awaited sequentially inside one async function, the fraud-risk timeout held the entire response hostage.

In the rest of this story
  1. How Server Components, Promises, and use() Fit Together
  2. Rebuilding the Dashboard with Independent Suspense Boundaries
  3. The Full Working Example
  4. Choosing Between loading.tsx and Explicit Suspense
  5. Pitfalls We Hit Shipping This
1 code example · 9 min read in full
Member-only story

Checking your membership…

Members read every Tech Buzz story in full, with code examples, audio and the discussion, plus every course, quiz and interview set in the Learning Dashboard.

0

Written by

MCB Editorial

Tech Buzz Daily Desk. Contributing deep-dive engineering architectures, cloud paradigms, and system design insights to Master Class Buddy.