-
I have some questions about behaviour of simultaneous queries:
|
Beta Was this translation helpful? Give feedback.
Answered by
phryneas
Aug 5, 2024
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
R will resolve cache entry for R
RT will resolve cache entry for RT
RTK will resolve cache entry for RTK
meanwhile
the hook looks at the cache entry for R
the hook looks at the cache entry for RT. If the hook already had data from before switching to RT, it will keep that until new data for RT arrived
the hook looks at the cache entry for RTK. If the hook already had data from before switching to RTK, it will keep that until new data for RTK arrived
There's no real "concurrency" going on. Three different requests for three different cache entries, and a hook that only looks at one of them at a time, but might keep old results around.