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. With just one single line of code, you can simplify the logic of data fetching in your project, and also have all many amazing features out-of-the-box. SWR has you covered in all aspects of speed, correctness, and stability to help you build better experiences. Fast page navigation, polling on interval, data dependency, revalidation on focus, revalidation on network recovery, local mutation (Optimistic UI), smart error retry, pagination and scroll position recovery, React Suspense, and more.

Features

  • Jamstack oriented
  • Fast, lightweight and reusable data fetching
  • Built-in cache and request deduplication
  • Real-time experience
  • Transport and protocol agnostic
  • TypeScript ready
  • React Native

Project Samples

Project Activity

See All Activity >

Categories

Search, Libraries

License

MIT License

Follow SWR

SWR Web Site

You Might Also Like
Top-Rated Free CRM Software Icon
Top-Rated Free CRM Software

216,000+ customers in over 135 countries grow their businesses with HubSpot

HubSpot is an AI-powered customer platform with all the software, integrations, and resources you need to connect your marketing, sales, and customer service. HubSpot's connected platform enables you to grow your business faster by focusing on what matters most: your customers.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SWR!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Search Software, TypeScript Libraries

Registered

2021-03-22