-
Notifications
You must be signed in to change notification settings - Fork 49k
Remove SchedulerHostConfigs #20025
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 SchedulerHostConfigs #20025
Changes from all commits
92691a6
c91346b
34c4769
58a89a6
1df1e95
c0d603d
1527bb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
|
||
'use strict'; | ||
|
||
export * from './src/Scheduler'; | ||
export * from './src/forks/SchedulerDOM'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/scheduler-unstable_no_dom.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/scheduler-unstable_no_dom.development.js'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
"tracing.js", | ||
"tracing-profiling.js", | ||
"unstable_mock.js", | ||
"unstable_no_dom.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I considered calling the NoDOM version Native since the primary user will be React Native, what do you think about the naming @acdlite? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me the primary purpose is to act as a last resort if you accidentally call this in a Node.js environment, like if you run a test without wrapping in React Native will eventually need its own scheduler, so I'd rather not call this one a React Native scheduler since it's not optimized for that at all. |
||
"unstable_post_task.js", | ||
"cjs/", | ||
"umd/" | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm not sure about this pattern because it's the first time we start doing this kind of switching in the npm wrappers and it won't port nicely to ESM. The thing that we do for production is a static switch which we can move into a compiler but we can't do the same for this.
We should move this branching into the implementation which forces us to treat this nicely in an ESM world.