Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

Urql side

I have looked at your reproduction and honestly, I don't know why the first request goes through, this check is due to the cache-check which tries to see synchronously whether or not there is a cached item available.

What this seems to signal is that the effect cleanup phase of React seems to be delayed longer than a microtick. When I change this to wait a tick i.e. setTimeout(x, 0) then it correctly cancels the request.

There are a few solutions I see here from the urql side of things

  • Change the cache-check to use a cache-only policy
  • Change to waiting for a tick

The issue here being that we don't know whether this react change will be long-t…

Replies: 4 comments 12 replies

Comment options

You must be logged in to vote
8 replies
@gonta1026
Comment options

@gonta1026
Comment options

@gonta1026
Comment options

@JoviDeCroock
Comment options

Answer selected by gonta1026
@gonta1026
Comment options

@gonta1026
Comment options

Comment options

You must be logged in to vote
3 replies
@gonta1026
Comment options

@gonta1026
Comment options

@gonta1026
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gonta1026
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants