Back to Developer Roadmap

SWR

src/data/roadmaps/react/content/swr@-ea1KsXEyz-4voHXklG_J.md

4.0612 B
Original Source

SWR

SWR is a React Hooks library for data fetching.

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

With just one hook, you can significantly simplify the data fetching logic in your project.

Visit the following resources to learn more: