Waterfall Loading Pattern

Demonstrates sequential data loading where each query depends on the result of the previous one. Watch the network tab to see requests happening one after another.

Step 1: Initial Data

getInitialData()

Loading initial data...

⚠️ Waterfall Anti-Pattern

  • Each query must wait for the previous one to complete
  • Total loading time: ~2 seconds (5 requests × 400ms each)
  • Network requests happen sequentially, not in parallel
  • This is generally an anti-pattern that should be avoided when possible
  • Better approach: Fetch all data in a single server-side request or use parallel queries