Data Fetching Patterns in Single-Page Applications

March 28, 2025

User interface showing an approval list with selectable rows and a pop-up menu offering 'Approve' and 'Reject' options

When a single-page application needs to fetch data from a remote source, it needs to do so while remaining responsive and providing feedback to the user during an often slow query. Five patterns help with this. Asynchronous State Handler wraps these queries with meta-queries for the state of the query. Parallel Data Fetching minimizes wait time. Fallback Markup specifies fallback displays in markup. Code Splitting loads only code that’s needed. Prefetching gathers data before it may needed to reduce latency when it is.

Source: Data Fetching Patterns in Single-Page Applications

This detailed article from Juntao QIU looks at 5 data fetching patterns in Single Page applications, (but doubtlessly more broadly applicable).