-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix HDR for single fetch #9954
Fix HDR for single fetch #9954
Conversation
🦋 Changeset detectedLatest commit: 0e87073 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -112,6 +113,61 @@ test("Vite / HMR & HDR / mdx", async ({ page, viteDev }) => { | |||
expect(page.errors).toEqual([]); | |||
}); | |||
|
|||
test.describe("single fetch", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't have copies of these tests with the flag enabled so didn't catch this until we migrated the changes to RR v7 where single fetch is always on
await revalidate(); | ||
} finally { | ||
window.__remixHdrActive = false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to know during the single fetch dataStrategy
if this is an HDR revalidation so we can force a server call since the route may have a new loader on the server we don't yet know about
results[m.route.id] = { | ||
type: "data", | ||
result: null, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was unnecessary - should instead be assigning to results
based on the result of handler()
below - not inside in the handlerOverride
. This will properly handle these types of routes which never make it to handlerOverride
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
No description provided.