Open MangelMaxime opened 1 year ago
Hi there @MangelMaxime,
Any chance you had a look at this issue to figure out what is wrong exactly with React.useCancellationToken()
?
I need to check again because I don't remember exactly.
But if I remember correctly the problem was that the token was marked as cancelled and never recreated/refreshed.
Workflow:
token
to be marked as cancelledtoken
is marked as cancelledDo you think we need to pass a dependencies array to the cancelation token hook?
I think I tried that and it didn't work any better. So in my code I disabled the cancellation support when compiling for DEBUG.
This need to be re-visited to see if I did something wrong at the time or not.
Because of the usage of
React.useCancellationToken()
when an HMR call has been triggered the async call is never triggered again.https://github.com/Zaid-Ajaj/Feliz/blob/52907b11f64c758282f2986f1aed0c91d46481b0/Feliz.UseDeferred/UseDeferred.fs#L62-L81