It& #39;s been amazing to see SWR flourish so fast. I& #39;ll share some insight on why we created it, which might help ellucidate why you need it too
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🧵" title="Thread" aria-label="Emoji: Thread"> https://twitter.com/vercel/status/1280176016825225216">https://twitter.com/vercel/st...
SWR is a tiny layer on top of React Hooks, which brings a great deal of automation to managing caches and data that gets re-used throughout your app.
As an example, when you lose your internet connection and re-connect, SWR will re-evaluate the data fetching on the screen.
As an example, when you lose your internet connection and re-connect, SWR will re-evaluate the data fetching on the screen.
It& #39;s always *eventually correct*. Data can be transitively stale, but the magic of hooks kicks in to re-fetch and bring everything up to speed.
Because it works on top of any async function, this means you get synchronization out of the box for any API backend (REST or GQL!)
Because it works on top of any async function, this means you get synchronization out of the box for any API backend (REST or GQL!)