Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump React Router to 6.14 #1678

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Bump React Router to 6.14 #1678

merged 1 commit into from
Jul 18, 2023

Conversation

david-crespo
Copy link
Collaborator

This is a trivial update, but I want to write down some notes on the future.v7_startTransition flag added in 6.13, which I am not turning on because (surprisingly) it breaks scroll restore. This video is a good demo of what that's about — basically it lets you compose multiple suspensions at navigation time and have them all roll up to a single suspense boundary. Not really something we need, but it's one of those "the way it's supposed to work" things that is good to opt into and means we'll probably get some nice things for free later on.

They initially turned the startTransition thing on for everyone in 6.12.0, but had to revert that and put it behind a flag because it broke people's apps (remix-run/react-router#10579). In theory, the bad thing people are doing that's incompatible with this change (but seems to work otherwise) is calling React.lazy() directly inside the render cycle (remix-run/react-router#10579 (comment)). We are not doing that, so I was hopeful that we wouldn't have an issue. And we almost didn't: we don't have a problem with basic navigation, like people were reporting on the issue.

But scroll restore breaks partially. Fortunately the e2e test for scroll restore caught it, so that's great. I haven't looked into why it might be breaking — I'm guessing something about the timing of when the scroll position is retrieved.

@vercel
Copy link

vercel bot commented Jul 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Jul 18, 2023 7:51pm

@david-crespo david-crespo merged commit 66d398e into main Jul 18, 2023
7 checks passed
@david-crespo david-crespo deleted the rr-6-14 branch July 18, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant