Add router.render for waiting on a navigation's data - #829
Open
pleek91 wants to merge 1 commit into
Open
Conversation
pleek91
force-pushed
the
router-render
branch
2 times, most recently
from
September 1, 2026 20:00
8fa0622 to
2ef85bd
Compare
✅ Deploy Preview for kitbag-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Awaiting push only waits for the route to commit, and props and loaders deliberately do not hold up a navigation. That leaves a server no point at which the page is renderable, and no way to learn that a props getter or loader redirected or rejected: without waiting it renders markup for the route it has already left, and with something awaiting the data the abandoning navigation rejects that promise and it renders nothing at all. router.render resolves once there is nothing left to render, following any navigation the data caused, and reports the status and location a server should respond with. The response is derived rather than recorded because the ordinary 404 sets no rejection at all — it commits the NotFound route — so the rejection alone would report 200 for most of them.
pleek91
force-pushed
the
router-render
branch
from
September 2, 2026 15:42
2ef85bd to
3c3da2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Awaiting
pushonly waits for the route to commit, and props and loaders deliberately don't hold up a navigation. That leaves a server with no point at which the page is renderable, and no way to learn that a props getter or loader redirected or rejected. Without waiting it renders markup for a route it has already left; with something awaiting the data, the abandoning navigation rejects that promise and it renders nothing at all.router.renderresolves once there is nothing left to render, following any navigation the data caused, and reports what a server should respond with.startno longer returns anything.The response is derived rather than recorded during navigation because the ordinary 404 sets no rejection at all — it commits the
NotFoundroute — so reading the rejection alone would report 200 for most of them.