Skip to content

Latest commit

 

History

History

swr

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SWR

useSWR is a client-side react hook for data fetching using the Stale-While-Revalidate (SWR) strategy. The strategy is simple:

  1. Starting from a stale state where the data is either static or can be retrieved quickly from a cache.
  2. Concurrently revalidate the current state by fetching the data from a dynamic source.

Setup

  1. Run the application.

    npm install
    npm run dev
  2. Navigate to http://localhost:3000.

Reference