bizz84/starter_architecture_flutter_firebase

Listeners/requests are duplicated on page refresh

Closed this issue · 1 comments

I have noticed using firebase emulators that when expecting the firestore "requests" tab, I can see multiple requests being made for the same data.
It's possible to replicate by entering the /jobs page, create a job and then refresh the page a bunch of times. When you create the next job, you'll see that a lot of requests are made to fetch all the jobs.

As can be seen on the attached image, I have only created 3 jobs, but the list is at least triggered 7 times. It seems to get triggered the amount of times that you have refreshed the page, possibly duplicating the listener that listens for changes? Just a guess.

I can only replicate this behavior in the browser, as it is refreshable

image

Looking into it a bit more, there's a possibility that it's just the firebase emulators that displays it wrongly: firebase/firebase-tools#4325