by ampdepolymerase · 6y ago · 0 comments
https://stackoverflow.com/questions/19975921/how-does-fireba...
A bit of feedback, the API looks fairly verbose compared to Firebase so a high level wrapper would be nice. Though that could simply be a side effect of Next.js being clunky.
> A bit of feedback, the API looks fairly verbose compared to Firebase
Thanks for this feedback. I do hope that it's just Next.js cluttering up. Here's a comparison without Next.js:
Realtime Firebase:
db
.collection("cities")
.doc("SF")
.onSnapshot(payload {
console.log("Current data: ", payload.data())
});
Realtime Supabase: supabase
.from('cities')
.eq('id', 'SF')
.on('UPDATE', payload => {
console.log("Current data: ", payload)
})
.subscribe()