nandorojo / swr-firestore

Implement Vercel's useSWR for querying Firestore in React/React Native/Expo apps. 👩‍🚒🔥
MIT License
775 stars 64 forks source link

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

Open neoromantic opened 3 years ago

neoromantic commented 3 years ago

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?

nandorojo commented 3 years ago

Are there any breaking changes to keep in mind?

neoromantic commented 3 years ago

@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).

estebanrao commented 2 years ago

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.