{"repo":"Kong/swrv","free":true,"listed":false,"github":"https://github.com/Kong/swrv","clone":"git clone https://github.com/Kong/swrv.git","description":"Stale-while-revalidate data fetching for Vue","language":"TypeScript","stars":2278,"topics":["vue","swr"],"license":"Apache-2.0","category":"ui-components","readme_excerpt":"swrv swrv (pronounced \"swerve\") is a library using the Vue Composition API for remote data fetching. It is largely a port of swr. - Documentation 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 fetch request (revalidate), and finally comes with the up-to-date data again. Features: - Transport and protocol agnostic data fetching - Fast page navigation - Interval polling - SSR support (removed as of version 0.10.0 - read more) - Vue 3 Support - Revalidation on focus - Request deduplication - TypeScript ready - Minimal API - Stale-if-error - Customizable cache implementation - Error Retry With swrv , components will get a stream of data updates constantly and automatically. Thus, the UI will be always fast and reactive. Table of Contents - Installation - Vue 3 - Vue 2.7 - Vue 2.6 and below - Getting Started - Api - Parameters - Return Values - Config options - Prefetching - Dependent Fetching - Stale-if-error - State Management - useSwrvState - Vuex - Cache - localStorage - Serve from cache only - Error Handling - FAQ - How is swrv different from the swr react library - Why does swrv make so many requests - How can I refetch swrv data to update it - Contributors ✨ Installation The version of swrv you install depends on the Vue dependency in your project. Vue 3 Vue 2.7 This version removes the dependency of the external @vue/composition-api plugin and a","default_branch":null,"files":null,"tree":[],"storefront":"/r/Kong","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Kong/swrv/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."}