{"repo":"ConsoleTVs/sswr","free":true,"listed":false,"github":"https://github.com/ConsoleTVs/sswr","clone":"git clone https://github.com/ConsoleTVs/sswr.git","description":"🔥 Svelte stale while revalidate (SWR) data fetching strategy","language":"TypeScript","stars":293,"topics":["svelte","swr","stale-while-revalidate","fetch","javascript","typescript"],"license":"MIT","category":"ui-components","readme_excerpt":"SSWR (Svelte Stale While Revalidate) Svelte stale while revalidate (SWR) data fetching strategy Table of Contents - Introduction - Features - Installation - Getting Started - Configuration options - Global configuration options - Dependent fetching - Re-validate on demand - Mutate on demand - Error handling - Clear Cache - Using with SvelteKit SSR - Contributors Introduction Quote from vercel's SWR for react: 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. Features - :tada: &nbsp; Built for Svelte - :fire: &nbsp; Extremely small and well packed at 2KB. - :fire: &nbsp; No dependencies (one polyfill for EventTarget) . - :+1: &nbsp; Built-in cache and request deduplication. - :eyes: &nbsp; Dependent fetching of data that depends on other. - :eyes: &nbsp; Real time experience. - :star: &nbsp; Typescript friendly. - :+1: &nbsp; Error handling by using the error variable provided. - :zap: &nbsp; Efficient DOM updates using Svelte reactivity. - :zap: &nbsp; Efficient HTTP requests are only done when needed. - :+1: &nbsp; Manual revalidation of the data by using revalidate() . - :+1: &nbsp; Optimistic UI / Manual mutation of the data by usi","default_branch":null,"files":null,"tree":[],"storefront":"/r/ConsoleTVs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ConsoleTVs/sswr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}