Lecture

SWR – React Hooks library for data fetching

SWR is React Hooks library for data fetching.

The name “SWR” is derived from stale-while-revalidate, a HTTP cache invalidation strategy popularized by HTTP RFC 5861. SWR is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data.

With SWR, components will get a stream of data updates constantly and automatically.

And the UI will be always fast and reactive.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *