There are two case of the race condition.
- The response returned from request is after the user mutating the model.
- Suppose
useInfiniteFetch fetch a post list with id from 1 to 10, and useFetch fetch the post with id 1 later. But the response from useFetch may be in front of the response from useInfiniteFetch. In this case, we will update the model with expired response.
There are two case of the race condition.
useInfiniteFetchfetch a post list with id from 1 to 10, anduseFetchfetch the post with id 1 later. But the response fromuseFetchmay be in front of the response fromuseInfiniteFetch. In this case, we will update the model with expired response.