Skip to content
Discussion options

You must be logged in to vote

I think there may be some confusion here, because I think you may have interpreted what as said to mean "don't use transitions for navigations", which is not what I meant. For navigations, you should always do it in a sync transition:

// this is for the history API
// the navigation API is a bit different
function navigate(url) {
  startTransition(() => {
    setRouterState(() => {
      url,
      // other router state
    })
  });
}

Then, any data that you need to GET for the new route can be handled by suspense. This allows React to immediately navigate to the next page with suspense placeholders, and allow the browser to start downloading resources such and fonts and CSS that it will …

Replies: 6 comments 8 replies

Comment options

brophdawg11
Nov 19, 2025
Collaborator Author

You must be logged in to vote
1 reply
@rickhanlonii
Comment options

Comment options

brophdawg11
Nov 19, 2025
Collaborator Author

You must be logged in to vote
1 reply
@rickhanlonii
Comment options

Comment options

brophdawg11
Nov 19, 2025
Collaborator Author

You must be logged in to vote
1 reply
@rickhanlonii
Comment options

Comment options

brophdawg11
Nov 19, 2025
Collaborator Author

You must be logged in to vote
1 reply
@rickhanlonii
Comment options

Comment options

You must be logged in to vote
4 replies
@brophdawg11
Comment options

brophdawg11 Nov 20, 2025
Collaborator Author

@brophdawg11
Comment options

brophdawg11 Nov 20, 2025
Collaborator Author

@rickhanlonii
Comment options

@rickhanlonii
Comment options

Answer selected by rickhanlonii
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants