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.
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 callingReact.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.