This article explores the evolution of data-fetching strategies, contrasting traditional server-rendered HTML with modern client-side REST and React Server Components (RSC). It highlights how different paradigms handle the tension between modular data loading and the efficiency of minimizing client-server roundtrips. The author argues that successful architectures must effectively balance component colocation with network efficiency.
Key points
Traditional server-side HTML rendering achieves data fetching in a single roundtrip because data is embedded directly in the response.
Client-side REST approaches often lead to multiple API requests per navigation, creating potential latency waterfalls.
React Server Components (RSC) aim to provide both data colocation and efficient single-request navigation by moving component execution to the server.
Effective data-fetching strategies must solve for the trade-off between modular development and network overhead.