nandorojo / swr-firestore

Implement Vercel's useSWR for querying Firestore in React/React Native/Expo apps. 👩‍🚒🔥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swr-firestore uses SWR version ^0.2.0, could it be updated to modern one?

neoromantic opened this issue · comments

Currently, swr-firestore depends on swr as ^0.2.0, which was released centuries ago and had had many patches since.

Could it be updated to current (0.5) version?

Are there any breaking changes to keep in mind?

@nandorojo I couldn't find one, seems to me that it should update as is. There are a lot of patches, fixes and performance updates, but API seems to be the same.

Same goes for using Firebase v7, I have some issues with it in production. For example, I can't use .where("someRefField", "==", docRef).

Hey!
Since this was originally posted version 1 of SWR came out: https://swr.vercel.app/blog/swr-v1
I'm not a heavy SWR user so I don't know if there were breaking changes, input on this would be great. There is a migration guide though https://swr.vercel.app/blog/swr-v1#migration-guide
I've made a quick test upgrading and this item looks the most breaking one:

useSWR no longer returns the revalidate method, change to mutate instead:

But this library already uses both.