Eliminate the Action->Loader waterfall #3260
colinclerk
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was watching the Remix Single on Forms and I noticed a sequential waterfall in the Network after the form was submitted:

The GET doesn't run until after the POST completes. This makes sense, since it avoids a race condition where the GET retrieves data before the POST has had a chance to finalize the mutation.
But, I still wonder if this GET can be eliminated.
Instead of triggering the loader refresh from the client, can it be triggered on the server and added to the POST's response? This would eliminate the extra round trip.
Beta Was this translation helpful? Give feedback.
All reactions