Always apply render preparations after running an action (#77898)
This PR centralizes some logic that we always want to run after executing a server action into `executeActionAndPrepareForRender`. This fixes some issues where we were only executing revalidates, setting draft mode, and synchronizing mutated cookies for fetch actions, but not MPA actions. I've also moved the logic for `addRevalidationHeader` to the one place where it makes sense -- after executing a fetch action. This header is only used by the client router and only makes sense to add if we actually executed an action, so e.g. calling it for each possible error type was unnecessary.
Showing
Please
register
or
sign in
to comment