Data Fetch
↔ (process) to Async GET
data from Server
aka Fetch-Data
Server State
state store on Backend RASP (Remote Async Shared Persistent)
Client State
state store by Client (Browser), TSC
Overfetch
(process) to Data Fetch & get extra unused data
Underfetch
(process) to Data Fetch incomplete data per req, waste extra reqs
Prefetch
(process) to Data Fetch in advance anticipation of future need
REST is prone to Overfetching & Underfetching which is non-deal when scaling
Network Waterfall
to load data in Synchronous Blocking stages
Dedupe
to prevent duplicate Reqs, avoid fetch same data
HTTP Caching
(process) to store HTTP Response to reuse for subsequent Reqs
Caching
(process) to store data for reuse
Retries
to repeat fetch, for given limit number of attempts & interval
Revalidation
(process) to purge HTTP Cache & re-fetch fresh data
Parallel Data Fetch
to init Reqs ASAP & load Concurrently
Sequential Data Fetch
(default) to Data Fetch with routes dependent on each other - lead to Waterfall cascade
REST
(standard)(model)(Paradigm) Client-Server Architecture to organize stateless Cachable Data Fetch
SOAP
(standard)(model) alternative to REST to transfer messages/small data over HTTP as XML
References
Overfetch
↔ (process) to Data Fetch & get extra unused dataUnderfetch
↔ (process) to Data Fetch incomplete data per req, waste extra reqsPrefetch
↔ (process) to Data Fetch in advance anticipation of future needMove Data Fetch to Server-Side
↔ ( Next 13 ) to Collocate Data Fetch ops in Server Component for Sync perfSequential Data Fetch
↔ (default) to Data Fetch with routes dependent on each other - lead to Waterfall cascadeStatic Fetch
↔ (process) to Data Fetch at build time, to Cache & reuse for future requestNext Data Fetching
↔ Opinionated Design Patterns in Next.js for Data Fetch situationsAsync
↔ of Server State takes time to Data Fetch & delay accessuseAsync()
↔async
Custom Hook to return value, error, status of Data FetchREST
↔ (standard)(model)(Paradigm) Client-Server Architecture to organize stateless Cachable Data Fetch@apollo/client
↔ JS state management lib to manage local/remote data via Declarative GraphQL Data FetchSWR
↔ React Lib to Data Fetch for client-side, handle Cache/Revalidate/Retries Front-End App (JS)axios
↔ popular library to Data Fetch, whenFetch API
was worse - now no longer needed?!createAsyncThunk()
↔ RTK API fn to Data Fetch from remote endpoint@reduxjs/toolkit/query
↔ RTK query API to Data Fetch/Cache & replace ThunkFetch API
↔ Web API to Data Fetch Web Resource viaasync
Promise
experiement_use
↔ React API to allow Async Data Fetch inside Server ComponentAJAX
↔ (process) to Asynchronous Data Fetch from Server (via clunky legacy XHR methods)Shallow Route
↔ (feat) to change URL w/o repeat Data Fetch for current Page