-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Remove duplicate RouterProvider implementations #11679
Conversation
🦋 Changeset detectedLatest commit: 2c6c99e 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 |
|
||
// TODO: This static import doesn't allow us to work quite right in a pure-react | ||
// app that doesn't even have react-dom as a dependency. Let's look into using | ||
// an export map for `react-router/dom that would provide the `flushSync` method | ||
// to the memory `<RouterProvider>` via a prop. And then | ||
// `import { RouterProvider } from 'react-router/memory'` // memory use case | ||
// `import { RouterProvider } from 'react-router/dom'` // DOM use case | ||
import * as ReactDOM from "react-dom"; |
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 figure out what to do here - putting this on hold until we can discuss the export map setup next week with @mjackson and @markdalgleish
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.
merge this PR and make an issue for this?
🤖 Hello there, We just published version Thanks! |
We used to have 2 of these since we kept DOM-specifics in
react-router-dom
(document.startViewTransition
,ReactDOM.flushSync
) but now we just need the one and it can be defensive against the lack ofwindow
/document