Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
Yep this is correct! Any previous fetch needs to be aborted.
Since this code was just for fun, I don't think I'll be spending the time to add these cases into it. But if someone wants to contribute a gist, i'll gladly link it.
Cheers!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your code is subject to race conditions.
See dev.to/sebastienlorber/handling-ap...
You'd rather use a lib that solves it for you with all the edge cases, like github.com/slorber/react-async-hook
Yep this is correct! Any previous
fetch
needs to be aborted.Since this code was just for fun, I don't think I'll be spending the time to add these cases into it. But if someone wants to contribute a gist, i'll gladly link it.
Cheers!