Skip to content

What's the benefit of upgrading to React Router v6 #8599

Closed Answered by ryanflorence
bchohon asked this question in v5 to v6 Migration
Discussion options

You must be logged in to vote

This is great feedback.

Removed history (MAJOR)

Typically people want this to navigate outside of the react render tree and that was unsafe because of React's concurrent mode would get the UI out of state with your history object. We wanted to be forward compatible so we just hid history until the React team had an answer.

React 18 shipped useExternalSyncStore which fixed the problems. Now you can use router.navigate in v6.4 to safely navigate outside of the react tree.

More information here: #8264 (comment)

Removed Prompt (MAJOR)

We're bringing this back. It was always broken. Will still be broken, but not as much. More information here: #8139 (comment)

Removed optional parameters

W…

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@rawpixel-vincent
Comment options

@martdavidson
Comment options

@igorsantos07
Comment options

Comment options

You must be logged in to vote
3 replies
@bchohon
Comment options

@WoodyWoodsta
Comment options

@igorsantos07
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by MichaelDeBoey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants