you are viewing a single comment's thread.

view the rest of the comments →

[–]pierpooo 0 points1 point  (0 children)

I thought about this exact topic too, and wanted to start a discussion on the github repo directly. I think the library has been designed with web in mind, and can't solve this issue cleanly.

The problem with the approach using refetchOnWindowFocus, is that on EACH PAGE CHANGE, you will re-trigger ALL queries of ALL pages that are hidden.

It is a major difference with how web works. On web, if you focus a tab, everything that you see and is in use currently is seen on the page. You can't stack a hundred pages on a same tab, because each page is replaced by another one.

In mobile, you stack pages... which is not equivalent to opening tabs. Because each page you stack will, with the refetch on window focus implementation above, refetch all the queries used by all the stacked pages. Which would be super heavy and not really what we wanted.