SWR from Zeit - React Hooks for Remote Data Fetching

Zeit has released a React hook, useSWR, which has a tag-line, “React Hooks for Remote Data Fetching”. Trying and loving SWR from Zeit - https://swr.now.sh/ - pure joy and realtime.


Looks like it has an overlap with Apollo client, the catching and optimistic UI part?

That looks pretty sweet. npdev:collections does some of that ( stale-while-revalidate - and some of the benefits they tout are provided by underlying Meteor tech or ground:db). I have pagination (infinite scroll) working, but don’t have scroll position recovery yet (it’s on my internal roadmap). I also don’t support Suspense just yet. If it’s open source, I may dig in to the code for some tips!

1 Like

It’s OS…here is the repo https://github.com/zeit/swr

1 Like

Maybe it could also be interesting to check out the latest Relay update (talk), the seem to have faced the same challenges around component data fetching.