Great post, thanks! Bit of additional trivia. When multiple fetchers data revalidations are inflight, Remix will commit them along the way as they land, but only if they are fresh. If a revalidation lands that was fired later than any that are still in flight, it will cancel those requests to ensure that your app never gets into the wrong state due to race conditions.
Most devs don't notice these bugs because their local server handles requests in order, but out in production you are not guaranteed that same behavior.
Demos we've ported to Remix written by the teams behind other frameworks (including the React team) even exhibit these bugs! Very few devs deal with it, but with Remix it's handled automatically.
Great post, thanks! Bit of additional trivia. When multiple fetchers data revalidations are inflight, Remix will commit them along the way as they land, but only if they are fresh. If a revalidation lands that was fired later than any that are still in flight, it will cancel those requests to ensure that your app never gets into the wrong state due to race conditions.
Most devs don't notice these bugs because their local server handles requests in order, but out in production you are not guaranteed that same behavior.
Demos we've ported to Remix written by the teams behind other frameworks (including the React team) even exhibit these bugs! Very few devs deal with it, but with Remix it's handled automatically.
Oh that's awesome, thanks for the comment!