-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Expose promises from underlying router operations for use in react 19 #11521
Conversation
🦋 Changeset detectedLatest commit: 81be2c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
React.useEffect(() => navigate("/with space"), []); | ||
React.useEffect(() => { | ||
navigate("/with space"); | ||
}, [navigate]); |
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.
Tests needed to be updated so they don't return promises from useEffect
@@ -142,7 +142,6 @@ type SetupOpts = { | |||
initialEntries?: InitialEntry[]; | |||
initialIndex?: number; | |||
hydrationData?: HydrationState; | |||
future?: FutureConfig; |
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.
Must be a duplicate from a merge conflict - we want the partial version below
@@ -1366,7 +1371,7 @@ export function createRouter(init: RouterInit): Router { | |||
return; | |||
} | |||
|
|||
return await startNavigation(historyAction, nextLocation, { | |||
await startNavigation(historyAction, nextLocation, { |
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.
Open question - what should happen on interrupted navigations? Right now the promise will resolve with undefined
when it gets interrupted. I don't think rejecting makes sense since we wouldn't want any error boundaries to trigger...
🤖 Hello there, We just published version Thanks! |
No description provided.