Skip to content
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 UMD builds by re-exporting the scheduler priorities #14914

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Feb 21, 2019

Closes #14904.

Fixes the regression to UMD builds since #14756 which caused all interactive updates in 16.8.2 to be scheduled with low priority.

bug

We had a test that checked for those but it used to ignore priorities because it wasn't important at the time. I'm making the test check those too.

Since the existing test also verifies the Scheduler UMD bundles, I added getters to those to make sure the API matches up. But that's not the important part of this fix. The important part is just adding those constants to "scheduler internals" for UMD.

fix

Note this means that even ReactDOM 16.8.3+ won't work correctly with older React UMDs. This might be surprising but it breaks often enough for UMDs that it's probably okay.

unstable_ImmediatePriority,
unstable_LowPriority,
unstable_NormalPriority,
unstable_UserBlockingPriority,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the important part of the fix. The rest isn't.

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving, but I suppose andrew should have a look too

@nhunzaker
Copy link
Contributor

I built a version of the fixtures with this change:
https://react-dom-umd-fix.surge.sh/text-inputs

Looks good to me, 👍

@gaearon gaearon merged commit 7de4d23 into facebook:master Feb 21, 2019
@gaearon gaearon deleted the fix-umd branch February 21, 2019 17:21
gaearon added a commit to acdlite/react that referenced this pull request Feb 21, 2019
Deraen added a commit to cljsjs/packages that referenced this pull request Mar 2, 2019
## 16.8.2 => 16.8.3

### React DOM

* Fix a bug that caused inputs to behave incorrectly in UMD builds. ([@gaearon](https://github.com/gaearon) in [#14914](facebook/react#14914))
* Fix a bug that caused render phase updates to be discarded. ([@gaearon](https://github.com/gaearon) in [#14852](facebook/react#14852))

### React DOM Server
* Unwind the context stack when a stream is destroyed without completing, to prevent incorrect values during a subsequent render. ([@overlookmotel](https://github.com/overlookmotel) in [#14706](facebook/react#14706))
Deraen added a commit to cljsjs/packages that referenced this pull request Mar 2, 2019
## 16.8.2 => 16.8.3

### React DOM

* Fix a bug that caused inputs to behave incorrectly in UMD builds. ([@gaearon](https://github.com/gaearon) in [#14914](facebook/react#14914))
* Fix a bug that caused render phase updates to be discarded. ([@gaearon](https://github.com/gaearon) in [#14852](facebook/react#14852))

### React DOM Server
* Unwind the context stack when a stream is destroyed without completing, to prevent incorrect values during a subsequent render. ([@overlookmotel](https://github.com/overlookmotel) in [#14706](facebook/react#14706))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

controlled input cursor jumps to end (again)
4 participants