-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
🐞 bugthis isn't working as expectedthis isn't working as expected
Description
Changing the key should create a new cache entry that cumulates new pages.
Modifying the queryParam
does reactively set data
to the cached value or trigger query()
and merge()
in case of cache-miss. However, as the pages
variable is shared between all merge
calls, queried data from all queryParams are mixed.
Here is a small playground to illustrate the issue. Try triggering few loadMore
with queryParam = 'a'
and switch it to 'b'
and load some extra data.
Ideally, the query
function would have access to the current cached data (e.g. in the context
argument). Thus, the merge
function would receive the accumulated pages of the current key
.
Originally posted by @VianneyRousset in #178
penumbra1, deptyped, r-moret and brolnickij
Metadata
Metadata
Assignees
Labels
🐞 bugthis isn't working as expectedthis isn't working as expected
Projects
Status
🆕 Triaging