-
Notifications
You must be signed in to change notification settings - Fork 24.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
Add closed-form damped harmonic oscillator algorithm to Animated.spring #15322
Conversation
@facebook-github-bot label Core Team @facebook-github-bot large-pr Attention: @janicduplessis Generated by 🚫 dangerJS |
Nice work! I'll have a closer look tomorrow, could you also add a test for the native implementations? Here are the tests for the other spring implementation: https://github.com/facebook/react-native/blob/master/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java#L265 and https://github.com/facebook/react-native/blob/master/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m#L269. |
@janicduplessis yah for sure. Sorry I missed them! |
3a852a1
to
0573ae8
Compare
Thanks @kmagiera for the thoughts. On analytic solution for velocity: I'll take a look at this further today. Just have to do the math. I think it's a reasonable ask. On replacing the current RK4 solution with DHO: I can play around with this. You're right that it theoretically should work, although, I also thought that I would be able to get the RK4 method to take mass into account by doing as you say -- treating tension as k, friction as c, and dividing On frame drops: I'm not sure how CASpringAnimation handles frame drops (probably not very common for it to ever encounter any, given that core animation runs out of process in a higher priority thread than the app). Re this particular implementation however, I've already added it to the JS and Android implementations: https://github.com/facebook/react-native/pull/15322/files#diff-f048d92ca0be679bc38d38147b311100R682 (JS) and https://github.com/facebook/react-native/pull/15322/files#diff-3205235300ac0a6c2dbcf7d2a7264117R161 (Android). This matches the behavior in the RK4 implementation. I didn't add it the iOS implementation, as I didn't see that we were accounting for frame drops anywhere else in the native Animated implementations, but maybe I should add the same logic here. |
|
@janicduplessis all sounds good. Worked on this a bit today. Hope to have a final version tomorrow |
This looks great. Quick note, I removed the "Core Team" label as we're currently using this label to track PRs that have already been assigned internally to a Facebook employee for further review. I wouldn't want to set the expectation that adding the label will automatically flag it for internal review - that process is still done manually. That said, if you want to get this reviewed by a FB employee, let me know! |
@janicduplessis @kmagiera this is ready for re-review. I've taken all of @kmagiera's comments and implemented them.
|
Awesome detective work :) @willbailey will likely be interested as he implemented rebound and the RK4 algorithm, I just copy pasted his implementation in RN |
As the others have said, fantastic work and sleuthing, @skevy! Would you be interested in breaking this out into its own library? Rebound is great, but it's encumbered by the PATENTS clause (for better or worse, many companies refuse to use any dependencies with a PATENTS clause). It's also 12K minified. If there was an accurate and unencumbered springs microlibrary, the JavaScript ecosystem would be better for it. Animated could wrap it for React Native, and we'd wrap it for material-motion. Please consider it. 😃 |
Nice work! (such math!) Out of curiosity, what is the use case for |
I think it is if you want your animation to not block InteractionManager.runAfterInteractions, could be useful for a looping animation. |
@appsforartists yah, I could take a crack at this. I'll DM you on twitter and we can chat about it. |
Not sure what your policy is on introducing external dependencies, but this algorithm now exists in its own repo: https://github.com/skevy/wobble/ Would be nice to have it in one canonical place, rather than two. |
957c77d
to
67d47ed
Compare
@janicduplessis this is rebased now and ready for final review. Thanks for your patience! cc @kmagiera |
@appsforartists fwiw I decided to keep the implementation implemented separately here for now, given the fact that RN also contains Obj-C/Java implementations of the same algorithm, and I think it's reasonable to keep them colocated. Maybe we can change this in the future, but I think it's easier for now. |
@@ -261,31 +261,14 @@ public void testNodeValueListenerIfListening() { | |||
verifyNoMoreInteractions(valueListener); | |||
} | |||
|
|||
@Test | |||
public void testSpringAnimation() { | |||
public void performSpringAnimationTestWithConfig(JavaOnlyMap config, Boolean testForCriticallyDamped) { |
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.
Nit: boolean
instead of Boolean
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.
Awesome work, just some small implementation details comments.
position += dxdt * step; | ||
velocity += dvdt * step; | ||
let deltaTime = 0.0; | ||
if (now > this._lastTime) { |
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.
Is this necesary? I don't see any case where now could be smaller than _lastTime.
@@ -65,11 +71,14 @@ class SpringAnimation extends Animation { | |||
_lastPosition: number; | |||
_fromValue: number; | |||
_toValue: any; | |||
_tension: number; | |||
_friction: number; | |||
_stiffness: ?number; |
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.
Can we make _stiffness
, _damping
, _mass
and _initialVelocity
non-nullable now? Looks like they are initialized in every case.
} | ||
this._frameTime += deltaTime; | ||
|
||
const c: number = this._damping || 0; |
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.
If we make those non-nullable we can remove the ||
@@ -25,15 +25,18 @@ @interface RCTSpringAnimation () | |||
|
|||
@end | |||
|
|||
const CGFloat MAX_DELTA_TIME = 0.064; |
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.
Let's use NSTimeInterval for time values
@@ -44,6 +47,8 @@ @implementation RCTSpringAnimation | |||
|
|||
NSInteger _iterations; | |||
NSInteger _currentLoop; | |||
|
|||
CGFloat _t; // Current time (startTime + dt) |
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.
NSTimeInterval
_animationStartTime = _animationCurrentTime = currentTime; | ||
|
||
// calculate delta time | ||
CFTimeInterval deltaTime; |
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.
NSTimeInterval
const k: number = this._stiffness || 0; | ||
const v0: number = -(this._initialVelocity || 0); | ||
|
||
invariant(m > 0, 'Mass value must be greater than 0'); |
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.
Can we assert this in the ctor instead? If we do that we could also remove those asserts from the native implementations.
@@ -73,7 +73,7 @@ class AnExChained extends React.Component<Object, any> { | |||
<Animated.Image | |||
{...handlers} | |||
key={i} | |||
source={{uri: CHAIN_IMGS[j]}} |
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.
Are these changes on purpose?
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.
Yah, but I can remove them if you want. It just puts some images in there so you can see the effect. The images that are currently in this list are broken links.
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.
Sure we can keep it, I assume the images were already there?
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.
Yes they were.
67d47ed
to
02e6356
Compare
Thanks for working on this. I'll import it and let some internal tests run, and if all goes well, I'll land it on Monday. |
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This is almost ready to land. I need to perform some manual steps before doing so. Stay tuned. |
* | ||
* We use the closed form of the second order differential equation: | ||
* | ||
* x'' + (2ζ⍵_0)x' + ⍵^2x = 0 |
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.
Our linter is complaining about these unicode characters (⍵, ζ, √). It may not be a big deal to import, as this is a comment and not executable code, but the check is probably there for a reason and may prevent issues with our current tooling.
Do you have any preference on how to format this instead? I could replace these with html entities, but that affects readability when looking at the code.
No need to edit your PR, I already have a copy of this PR checked out internally and I can apply any patch prior to landing.
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.
Hmm.
x'' + (2[zeta][omega]_0)x' + [omega]^2x = 0
?
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: As I was working on mimicking iOS animations for my ongoing work with `react-navigation`, one task I had was to match the "push from right" animation that is common in UINavigationController. I was able to grab the exact animation values for this animation with some LLDB magic, and found that the screen is animated using a `CASpringAnimation` with the parameters: - stiffness: 1000 - damping: 500 - mass: 3 After spending a considerable amount of time attempting to replicate the spring created with these values by CASpringAnimation by specifying values for tension and friction in the current `Animated.spring` implementation, I was unable to come up with mathematically equivalent values that could replicate the spring _exactly_. After doing some research, I ended up disassembling the QuartzCore framework, reading the assembly, and determined that Apple's implementation of `CASpringAnimation` does not use an integrated, numerical animation model as we do in Animated.spring, but instead solved for the closed form of the equations that govern damped harmonic oscillation (the differential equations themselves are [here](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator), and a paper describing the math to arrive at the closed-form solution to the second-order ODE that describes the DHO is [here](http://planetmath.org/sites/default/files/texpdf/39745.pdf)). Though we can get the currently implemented RK4 integration close by tweaking some values, it is, the current model is at it's core, an approximation. It seemed that if I wanted to implement the `CASpringAnimation` behavior _exactly_, I needed to implement the analytical model (as is implemented in `CASpringAnimation`) in `Animated`. We add three new optional parameters to `Animated.spring` (to both the JS and native implementations): - `stiffness`, a value describing the spring's stiffness coefficient - `damping`, a value defining how the spring's motion should be damped due to the forces of friction (technically called the _viscous damping coefficient_). - `mass`, a value describing the mass of the object attached to the end of the simulated spring Just like if a developer were to specify `bounciness`/`speed` and `tension`/`friction` in the same config, specifying any of these new parameters while also specifying the aforementioned config values will cause an error to be thrown. ~Defaults for `Animated.spring` across all three implementations (JS/iOS/Android) stay the same, so this is intended to be *a non-breaking change*.~ ~If `stiffness`, `damping`, or `mass` are provided in the config, we switch to animating the spring with the new damped harmonic oscillator model (`DHO` as described in the code).~ We replace the old RK4 integration implementation with our new analytic implementation. Tension/friction nicely correspond directly to stiffness/damping with the mass of the spring locked at 1. This is intended to be *a non-breaking change*, but there may be very slight differences in people's springs (maybe not even noticeable to the naked eye), given the fact that this implementation is more accurate. The DHO animation algorithm will calculate the _position_ of the spring at time _t_ explicitly and in an analytical fashion, and use this calculation to update the animation's value. It will also analytically calculate the velocity at time _t_, so as to allow animated value tracking to continue to work as expected. Also, docs have been updated to cover the new configuration options (and also I added docs for Animated configuration options that were missing, such as `restDisplacementThreshold`, etc). Run tests. Run "Animated Gratuitous App" and "NativeAnimation" example in RNTester. Closes facebook#15322 Differential Revision: D5794791 Pulled By: hramos fbshipit-source-id: 58ed9e134a097e321c85c417a142576f6a8952f8
Summary: As I was working on mimicking iOS animations for my ongoing work with `react-navigation`, one task I had was to match the "push from right" animation that is common in UINavigationController. I was able to grab the exact animation values for this animation with some LLDB magic, and found that the screen is animated using a `CASpringAnimation` with the parameters: - stiffness: 1000 - damping: 500 - mass: 3 After spending a considerable amount of time attempting to replicate the spring created with these values by CASpringAnimation by specifying values for tension and friction in the current `Animated.spring` implementation, I was unable to come up with mathematically equivalent values that could replicate the spring _exactly_. After doing some research, I ended up disassembling the QuartzCore framework, reading the assembly, and determined that Apple's implementation of `CASpringAnimation` does not use an integrated, numerical animation model as we do in Animated.spring, but instead solved for the closed form of the equations that govern damped harmonic oscillation (the differential equations themselves are [here](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator), and a paper describing the math to arrive at the closed-form solution to the second-order ODE that describes the DHO is [here](http://planetmath.org/sites/default/files/texpdf/39745.pdf)). Though we can get the currently implemented RK4 integration close by tweaking some values, it is, the current model is at it's core, an approximation. It seemed that if I wanted to implement the `CASpringAnimation` behavior _exactly_, I needed to implement the analytical model (as is implemented in `CASpringAnimation`) in `Animated`. We add three new optional parameters to `Animated.spring` (to both the JS and native implementations): - `stiffness`, a value describing the spring's stiffness coefficient - `damping`, a value defining how the spring's motion should be damped due to the forces of friction (technically called the _viscous damping coefficient_). - `mass`, a value describing the mass of the object attached to the end of the simulated spring Just like if a developer were to specify `bounciness`/`speed` and `tension`/`friction` in the same config, specifying any of these new parameters while also specifying the aforementioned config values will cause an error to be thrown. ~Defaults for `Animated.spring` across all three implementations (JS/iOS/Android) stay the same, so this is intended to be *a non-breaking change*.~ ~If `stiffness`, `damping`, or `mass` are provided in the config, we switch to animating the spring with the new damped harmonic oscillator model (`DHO` as described in the code).~ We replace the old RK4 integration implementation with our new analytic implementation. Tension/friction nicely correspond directly to stiffness/damping with the mass of the spring locked at 1. This is intended to be *a non-breaking change*, but there may be very slight differences in people's springs (maybe not even noticeable to the naked eye), given the fact that this implementation is more accurate. The DHO animation algorithm will calculate the _position_ of the spring at time _t_ explicitly and in an analytical fashion, and use this calculation to update the animation's value. It will also analytically calculate the velocity at time _t_, so as to allow animated value tracking to continue to work as expected. Also, docs have been updated to cover the new configuration options (and also I added docs for Animated configuration options that were missing, such as `restDisplacementThreshold`, etc). Run tests. Run "Animated Gratuitous App" and "NativeAnimation" example in RNTester. Closes facebook#15322 Differential Revision: D5794791 Pulled By: hramos fbshipit-source-id: 58ed9e134a097e321c85c417a142576f6a8952f8
Summary: As I was working on mimicking iOS animations for my ongoing work with `react-navigation`, one task I had was to match the "push from right" animation that is common in UINavigationController. I was able to grab the exact animation values for this animation with some LLDB magic, and found that the screen is animated using a `CASpringAnimation` with the parameters: - stiffness: 1000 - damping: 500 - mass: 3 After spending a considerable amount of time attempting to replicate the spring created with these values by CASpringAnimation by specifying values for tension and friction in the current `Animated.spring` implementation, I was unable to come up with mathematically equivalent values that could replicate the spring _exactly_. After doing some research, I ended up disassembling the QuartzCore framework, reading the assembly, and determined that Apple's implementation of `CASpringAnimation` does not use an integrated, numerical animation model as we do in Animated.spring, but instead solved for the closed form of the equations that govern damped harmonic oscillation (the differential equations themselves are [here](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator), and a paper describing the math to arrive at the closed-form solution to the second-order ODE that describes the DHO is [here](http://planetmath.org/sites/default/files/texpdf/39745.pdf)). Though we can get the currently implemented RK4 integration close by tweaking some values, it is, the current model is at it's core, an approximation. It seemed that if I wanted to implement the `CASpringAnimation` behavior _exactly_, I needed to implement the analytical model (as is implemented in `CASpringAnimation`) in `Animated`. We add three new optional parameters to `Animated.spring` (to both the JS and native implementations): - `stiffness`, a value describing the spring's stiffness coefficient - `damping`, a value defining how the spring's motion should be damped due to the forces of friction (technically called the _viscous damping coefficient_). - `mass`, a value describing the mass of the object attached to the end of the simulated spring Just like if a developer were to specify `bounciness`/`speed` and `tension`/`friction` in the same config, specifying any of these new parameters while also specifying the aforementioned config values will cause an error to be thrown. ~Defaults for `Animated.spring` across all three implementations (JS/iOS/Android) stay the same, so this is intended to be *a non-breaking change*.~ ~If `stiffness`, `damping`, or `mass` are provided in the config, we switch to animating the spring with the new damped harmonic oscillator model (`DHO` as described in the code).~ We replace the old RK4 integration implementation with our new analytic implementation. Tension/friction nicely correspond directly to stiffness/damping with the mass of the spring locked at 1. This is intended to be *a non-breaking change*, but there may be very slight differences in people's springs (maybe not even noticeable to the naked eye), given the fact that this implementation is more accurate. The DHO animation algorithm will calculate the _position_ of the spring at time _t_ explicitly and in an analytical fashion, and use this calculation to update the animation's value. It will also analytically calculate the velocity at time _t_, so as to allow animated value tracking to continue to work as expected. Also, docs have been updated to cover the new configuration options (and also I added docs for Animated configuration options that were missing, such as `restDisplacementThreshold`, etc). Run tests. Run "Animated Gratuitous App" and "NativeAnimation" example in RNTester. Closes facebook#15322 Differential Revision: D5794791 Pulled By: hramos fbshipit-source-id: 58ed9e134a097e321c85c417a142576f6a8952f8
Summary: As I was working on mimicking iOS animations for my ongoing work with `react-navigation`, one task I had was to match the "push from right" animation that is common in UINavigationController. I was able to grab the exact animation values for this animation with some LLDB magic, and found that the screen is animated using a `CASpringAnimation` with the parameters: - stiffness: 1000 - damping: 500 - mass: 3 After spending a considerable amount of time attempting to replicate the spring created with these values by CASpringAnimation by specifying values for tension and friction in the current `Animated.spring` implementation, I was unable to come up with mathematically equivalent values that could replicate the spring _exactly_. After doing some research, I ended up disassembling the QuartzCore framework, reading the assembly, and determined that Apple's implementation of `CASpringAnimation` does not use an integrated, numerical animation model as we do in Animated.spring, but instead solved for the closed form of the equations that govern damped harmonic oscillation (the differential equations themselves are [here](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator), and a paper describing the math to arrive at the closed-form solution to the second-order ODE that describes the DHO is [here](http://planetmath.org/sites/default/files/texpdf/39745.pdf)). Though we can get the currently implemented RK4 integration close by tweaking some values, it is, the current model is at it's core, an approximation. It seemed that if I wanted to implement the `CASpringAnimation` behavior _exactly_, I needed to implement the analytical model (as is implemented in `CASpringAnimation`) in `Animated`. We add three new optional parameters to `Animated.spring` (to both the JS and native implementations): - `stiffness`, a value describing the spring's stiffness coefficient - `damping`, a value defining how the spring's motion should be damped due to the forces of friction (technically called the _viscous damping coefficient_). - `mass`, a value describing the mass of the object attached to the end of the simulated spring Just like if a developer were to specify `bounciness`/`speed` and `tension`/`friction` in the same config, specifying any of these new parameters while also specifying the aforementioned config values will cause an error to be thrown. ~Defaults for `Animated.spring` across all three implementations (JS/iOS/Android) stay the same, so this is intended to be *a non-breaking change*.~ ~If `stiffness`, `damping`, or `mass` are provided in the config, we switch to animating the spring with the new damped harmonic oscillator model (`DHO` as described in the code).~ We replace the old RK4 integration implementation with our new analytic implementation. Tension/friction nicely correspond directly to stiffness/damping with the mass of the spring locked at 1. This is intended to be *a non-breaking change*, but there may be very slight differences in people's springs (maybe not even noticeable to the naked eye), given the fact that this implementation is more accurate. The DHO animation algorithm will calculate the _position_ of the spring at time _t_ explicitly and in an analytical fashion, and use this calculation to update the animation's value. It will also analytically calculate the velocity at time _t_, so as to allow animated value tracking to continue to work as expected. Also, docs have been updated to cover the new configuration options (and also I added docs for Animated configuration options that were missing, such as `restDisplacementThreshold`, etc). Run tests. Run "Animated Gratuitous App" and "NativeAnimation" example in RNTester. Closes facebook/react-native#15322 Differential Revision: D5794791 Pulled By: hramos fbshipit-source-id: 58ed9e134a097e321c85c417a142576f6a8952f8
Summary: This sync includes the following changes: - **[1b2159acc](facebook/react@1b2159acc )**: [React Native] measure calls will now call FabricUIManager (#15324) //<Eli White>// - **[c7a959982](facebook/react@c7a959982 )**: [React Native] Add tests to paper renderer for measure, measureLayout (#15323) //<Eli White>// - **[aece8119c](facebook/react@aece8119c )**: Refactor EventComponent logic + add onOwnershipChange callback (#15354) //<Dominic Gannaway>// - **[183d1f42e](facebook/react@183d1f42e )**: Fix: Measure expiration times relative to module initialization (#15357) //<Andrew Clark>// - **[b4bc33a58](facebook/react@b4bc33a58 )**: Fix areHookInputsEqual method warning params order (#15345) //<砖家>// - **[29fb5862f](facebook/react@29fb5862f )**: Move EventComponent state creation to complete phase + tests (#15352) //<Dominic Gannaway>// - **[745baf2e0](facebook/react@745baf2e0 )**: Provide new jsx transform target for reactjs/rfcs#107 (#15141) //<Ricky Vetter>// - **[81a61b1d1](facebook/react@81a61b1d1 )**: React events: add delay props to Press module (#15340) //<Nicolas Gallagher>// - **[4064ea9fa](facebook/react@4064ea9fa )**: Experimental event API: Support EventComponent onUnmount responder callback (#15335) //<Dominic Gannaway>// - **[4fbbae8af](facebook/react@4fbbae8af )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (#15308) //<Dominic Gannaway>// - **[958b6173f](facebook/react@958b6173f )**: Add delay props to Hover event module (#15325) //<Nicolas Gallagher>// - **[c3cc936da](facebook/react@c3cc936da )**: Add Hover,Focus,Press docs to REAMDE (#15328) //<Nicolas Gallagher>// - **[49595e921](facebook/react@49595e921 )**: [New Scheduler] Fix: Suspending an expired update (#15326) //<Andrew Clark>// - **[b93a8a9bb](facebook/react@b93a8a9bb )**: Experimental event API: refactor responder modules for lifecycle inclusion (#15322) //<Dominic Gannaway>// - **[937d262f5](facebook/react@937d262f5 )**: React events: keyboard press, types, tests (#15314) //<Nicolas Gallagher>// - **[7a2dc4853](facebook/react@7a2dc4853 )**: Allow DevTools to toggle Suspense fallbacks (#15232) //<Dan Abramov>// - **[43b1f74c8](facebook/react@43b1f74c8 )**: Alternate fix for #14198 //<Andrew Clark>// - **[41aa345d2](facebook/react@41aa345d2 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>// - **[6d0effad7](facebook/react@6d0effad7 )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (#15311) //<Andrew Clark>// - **[3a44ccefe](facebook/react@3a44ccefe )**: Fix feature flags react-dom/unstable-new-scheduler (#15309) //<Andrew Clark>// - **[92a1d8fea](facebook/react@92a1d8fea )**: mark react-events as private so we publish script skips it for now (#15307) //<Sunil Pai>// - **[e5c59359c](facebook/react@e5c59359c )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (#15305) //<Dan Abramov>// - **[73187239a](facebook/react@73187239a )**: writing unit tests in experimental event Drag API (#15297) //<Behzad Abbasi>// - **[89064fe68](facebook/react@89064fe68 )**: Adds displayName to EventComponent and EventTarget (#15268) //<Dominic Gannaway>// - **[fc6a9f1a1](facebook/react@fc6a9f1a1 )**: Add test for async event dispatching (#15300) //<Nicolas Gallagher>// - **[38fa84088](facebook/react@38fa84088 )**: Experiemental event API - wrap async dispatched events (#15299) //<Dominic Gannaway>// - **[4d5cb64aa](facebook/react@4d5cb64aa )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (#15151) //<Andrew Clark>// - **[aed0e1c30](facebook/react@aed0e1c30 )**: await act(async () => ...) (#14853) //<Sunil Pai>// - **[4c75881ee](facebook/react@4c75881ee )**: Remove maxDuration from tests (#15272) //<Sebastian Markbåge>// - **[9307932fe](facebook/react@9307932fe )**: Refactor event object creation for the experimental event API (#15295) //<Dominic Gannaway>// - **[6a1e6b2f7](facebook/react@6a1e6b2f7 )**: Experimental event API: loosen EventTarget constraints and warnings (#15292) //<Dominic Gannaway>// - **[f243deab8](facebook/react@f243deab8 )**: Add tests for Press responder event module (#15290) //<Nicolas Gallagher>// - **[296c4393d](facebook/react@296c4393d )**: Add Press event prop types and fix a check in Safari (#15288) //<Nicolas Gallagher>// - **[4482fdded](facebook/react@4482fdded )**: Fix host context issues around EventComponents and EventTargets (#15284) //<Dominic Gannaway>// - **[5ef0d1d29](facebook/react@5ef0d1d29 )**: Rename hover props in experimental event API and write unit tests (#15283) //<Behzad Abbasi>// - **[9444a5472](facebook/react@9444a5472 )**: Warn on nested EventTragets in experimental event API (#15287) //<Dominic Gannaway>// - **[7f1f5ddc3](facebook/react@7f1f5ddc3 )**: Rename press props in experimental event API (#15263) //<Nicolas Gallagher>// - **[2e02469fa](facebook/react@2e02469fa )**: ReactNative's ref.measureLayout now takes a ref (#15126) //<Eli White>// - **[1b94fd215](facebook/react@1b94fd215 )**: Make setNativeProps a no-op with Fabric renderer (#15094) //<Eli White>// - **[08055a625](facebook/react@08055a625 )**: Fix Press module in experimental event API (#15262) //<Nicolas Gallagher>// - **[f4625f518](facebook/react@f4625f518 )**: Fix on(Long)PressChange events in experimental press event API (#15256) //<Nicolas Gallagher>// - **[a41b21770](facebook/react@a41b21770 )**: Add additional event API responder surfaces (#15248) //<Dominic Gannaway>// - **[700f17be6](facebook/react@700f17be6 )**: Fix longpress in experimental Press event module (#15246) //<Nicolas Gallagher>// - **[5d336df70](facebook/react@5d336df70 )**: Allow for null targetFiber for root event handling (#15247) //<Dominic Gannaway>// - **[c6f3524df](facebook/react@c6f3524df )**: Adds React event component and React event target support to SSR renderer (#15242) //<Dominic Gannaway>// - **[c7a2dce50](facebook/react@c7a2dce50 )**: Disable JS urls at build level for www (#15230) //<Sebastian Markbåge>// - **[fb6b50871](facebook/react@fb6b50871 )**: Update versions for 16.8.6 //<Dan Abramov>// - **[1cfd25668](facebook/react@1cfd25668 )**: Fix circular module imports causing file size increase (#15231) //<Dominic Gannaway>// - **[669cafb36](facebook/react@669cafb36 )**: Adds experimental event component responder surfaces (#15228) //<Dominic Gannaway>// - **[d8cb10f11](facebook/react@d8cb10f11 )**: Enabled warnAboutDeprecatedLifecycles flag by default (#15186) //<Brian Vaughn>// - **[80f8b0d51](facebook/react@80f8b0d51 )**: Add part of the event responder system for experimental event API (#15179) //<Dominic Gannaway>// - **[5c2b2c085](facebook/react@5c2b2c085 )**: Warn about async infinite useEffect loop (#15180) //<Dan Abramov>// - **[8e9a013c0](facebook/react@8e9a013c0 )**: Release 16.8.5 //<Dan Abramov>// - **[f33e5790b](facebook/react@f33e5790b )**: [email protected] //<Dan Abramov>// - **[b1cccd1ed](facebook/react@b1cccd1ed )**: Warn about setState directly in dep-less useEffect (#15184) //<Dan Abramov>// - **[78f2775ed](facebook/react@78f2775ed )**: Flip event passive logic on passiveBrowserEventsSupported (#15190) //<Dominic Gannaway>// - **[f161ee2eb](facebook/react@f161ee2eb )**: React.warn() and React.error() (#15170) //<Brian Vaughn>// - **[78968bb3d](facebook/react@78968bb3d )**: Validate useEffect without deps too (#15183) //<Dan Abramov>// - **[4b8e1641b](facebook/react@4b8e1641b )**: Fork performWork instead of using boolean flag (#15169) //<Sebastian Markbåge>// - **[56035dac6](facebook/react@56035dac6 )**: unstable_Profiler -> Profiler (#15172) //<Brian Vaughn>// - **[31518135c](facebook/react@31518135c )**: Strengthen nested update counter test coverage (#15166) //<Dan Abramov>// - **[66f280c87](facebook/react@66f280c87 )**: Add internal logic for listening to event responders (#15168) //<Dominic Gannaway>// - **[b1a56abd6](facebook/react@b1a56abd6 )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>// - **[45f571736](facebook/react@45f571736 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>// - **[c05b4b81f](facebook/react@c05b4b81f )**: Link to useLayoutEffect gist in a warning (#15158) //<Dan Abramov>// - **[061d6ce3c](facebook/react@061d6ce3c )**: fix(react-dom): access iframe contentWindow instead of contentDocument (#15099) //<Renan Valentin>// - **[b83e01cad](facebook/react@b83e01cad )**: Adds more scaffolding for experimental event API (#15112) //<Dominic Gannaway>// - **[daeda44d8](facebook/react@daeda44d8 )**: Follow up to 15150 (#15152) //<Dominic Gannaway>// - **[acd65db5b](facebook/react@acd65db5b )**: Deprecate module pattern (factory) components (#15145) //<Sebastian Markbåge>// - **[55cc921c5](facebook/react@55cc921c5 )**: Adds react-events package for internal testing (#15150) //<Dominic Gannaway>// - **[7ad738630](facebook/react@7ad738630 )**: Improve warning for invalid class contextType (#15142) //<Dan Abramov>// - **[1e3364e76](facebook/react@1e3364e76 )**: Test that we don't suspend when disabling yielding (#15143) //<Sebastian Markbåge>// - **[42c3c967d](facebook/react@42c3c967d )**: Compile invariant directly to throw expressions (#15071) //<Andrew Clark>// - **[df7b87d25](facebook/react@df7b87d25 )**: Warn for Context.Consumer with contextType (#14831) //<Brandon Dail>// - **[2b93d686e](facebook/react@2b93d686e )**: Add more info to invalid hook call error message (#15139) //<Jared Palmer>// - **[d926936f0](facebook/react@d926936f0 )**: Eager bailout optimization should always compare to latest reducer (#15124) //<Andrew Clark>// - **[4162f6026](facebook/react@4162f6026 )**: Add feature flag to disable yielding (#15119) //<Sebastian Markbåge>// - **[8d60bd4dc](facebook/react@8d60bd4dc )**: [Shallow] Implement setState for Hooks and remount on type change (#15120) //<Dan Abramov>// - **[035e4cffb](facebook/react@035e4cffb )**: Change passive checker to use defineProperty (#15121) //<Dominic Gannaway>// - **[b283d75c1](facebook/react@b283d75c1 )**: Support React.memo in ReactShallowRenderer (#14816) //<Brandon Dail>// - **[f0621fe23](facebook/react@f0621fe23 )**: Use same example code for async effect warning (#15118) //<Dan Abramov>// - **[52c870c8d](facebook/react@52c870c8d )**: Fix shallow renderer not allowing hooks in forwardRef render functions (#15100) //<Sebastian Silbermann>// - **[f1ff4348c](facebook/react@f1ff4348c )**: Don't suggest a function as its own dep (#15115) //<Dan Abramov>// - **[371bbf36b](facebook/react@371bbf36b )**: Add infrastructure for passive/non-passive event support for future API exploration (#15036) //<Dominic Gannaway>// - **[ab5fe174c](facebook/react@ab5fe174c )**: Don't set the first option as selected in select tag with `size` attribute (#14242) //<Mateusz>// - **[935f60083](facebook/react@935f60083 )**: [email protected] //<Dan Abramov>// - **[0c03a4743](facebook/react@0c03a4743 )**: Adds experimental event API scaffolding (#15108) //<Dominic Gannaway>// - **[1204c7897](facebook/react@1204c7897 )**: [eslint] Wording tweaks (#15078) //<Sophie Alpert>// - **[9d77a317b](facebook/react@9d77a317b )**: Improve async useEffect warning (#15104) //<Dan Abramov>// - **[103378b1e](facebook/react@103378b1e )**: Warn for javascript: URLs in DOM sinks (#15047) //<Sebastian Markbåge>// - **[5d0c3c6c7](facebook/react@5d0c3c6c7 )**: [Partial Hydration] Render client-only content at normal priority (#15061) //<Sebastian Markbåge>// - **[6a4a261ee](facebook/react@6a4a261ee )**: Test suspended children are hidden before layout in persistent mode (#15030) //<Andrew Clark>// - **[bc8bd24c1](facebook/react@bc8bd24c1 )**: Run persistent mode tests in CI (#15029) //<Andrew Clark>// - **[3f4852fa5](facebook/react@3f4852fa5 )**: Run Placeholder tests in persistent mode, too (#15013) //<Andrew Clark>// - **[d0289c7e3](facebook/react@d0289c7e3 )**: [email protected] //<Dan Abramov>// - **[03ad9c73e](facebook/react@03ad9c73e )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (#15055) //<Dan Abramov>// - **[eb6247a9a](facebook/react@eb6247a9a )**: More concise messages (#15053) //<Dan Abramov>// - **[197703ecc](facebook/react@197703ecc )**: [ESLint] Add more hints to lint messages (#15046) //<Dan Abramov>// - **[6d2666bab](facebook/react@6d2666bab )**: Fix ESLint rule crash (#15044) //<Dan Abramov>// - **[9b7e1d138](facebook/react@9b7e1d138 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (#15026) //<Dan Abramov>// - **[1e3b6192b](facebook/react@1e3b6192b )**: Import Scheduler directly, not via host config (#14984) //<Andrew Clark>// - **[5d49dafac](facebook/react@5d49dafac )**: Enforce deps array in useMemo and useCallback (#15025) //<Dan Abramov>// - **[a9aa24ed8](facebook/react@a9aa24ed8 )**: 16.8.4 and changelog //<Brian Vaughn>// - **[fa5d4ee43](facebook/react@fa5d4ee43 )**: [ESLint] Treat functions that don't capture anything as static (#14996) //<Dan Abramov>// - **[fd557d453](facebook/react@fd557d453 )**: Warn on mount when deps are not an array (#15018) //<Dan Abramov>// - **[ce45ca9ba](facebook/react@ce45ca9ba )**: Prettier //<Andrew Clark>// - **[757a70b25](facebook/react@757a70b25 )**: ReactNoop.yield -> Scheduler.yieldValue (#15008) //<Andrew Clark>// - **[9d756d903](facebook/react@9d756d903 )**: Revert #14756 changes to ReactFiberScheduler (#14992) //<Andrew Clark>// - **[f16442a10](facebook/react@f16442a10 )**: [email protected] //<Dan Abramov>// - **[e1e45fb36](facebook/react@e1e45fb36 )**: [ESLint] Suggest to destructure props when they are only used as members (#14993) //<Dan Abramov>// - **[59ef28437](facebook/react@59ef28437 )**: Warn about dependencies outside of render scope (#14990) //<Dan Abramov>// - **[df7b4768c](facebook/react@df7b4768c )**: [ESLint] Deduplicate suggested dependencies (#14982) //<Dan Abramov>// - **[02404d793](facebook/react@02404d793 )**: Avoid dynamic dispatch for scheduler calls (#14968) //<Dan Abramov>// - **[bb2939ccc](facebook/react@bb2939ccc )**: Support editable useState hooks in DevTools (#14906) //<Brian Vaughn>// - **[69060e1da](facebook/react@69060e1da )**: Swap expect(ReactNoop) for expect(Scheduler) (#14971) //<Andrew Clark>// - **[ccb2a8a44](facebook/react@ccb2a8a44 )**: Replace test renderer's fake Scheduler implementation with mock build (#14970) //<Andrew Clark>// - **[53e787b45](facebook/react@53e787b45 )**: Replace noop's fake Scheduler implementation with mock Scheduler build (#14969) //<Andrew Clark>// - **[3ada82b74](facebook/react@3ada82b74 )**: Allow extraneous effect dependencies (#14967) //<Dan Abramov>// - **[00748c53e](facebook/react@00748c53e )**: Add new mock build of Scheduler with flush, yield API (#14964) //<Andrew Clark>// - **[4186952a6](facebook/react@4186952a6 )**: Fixed incompatibility between react-debug-tools and useContext() (#14940) //<Brian Vaughn>// - **[0b8efb229](facebook/react@0b8efb229 )**: Allow omitting constant primitive deps (#14959) //<Dan Abramov>// - **[875d05d55](facebook/react@875d05d55 )**: Include full error messages in React Native build (#15363) //<Andrew Clark>// - **[c64b33003](facebook/react@c64b33003 )**: Move EventTypes to ReactTypes (#15364) //<Dominic Gannaway>// - **[4c78ac0b9](facebook/react@4c78ac0b9 )**: Track Event Time as the Start Time for Suspense (#15358) //<Sebastian Markbåge>// Changelog: [General][Changed] - React sync for revisions 8e25ed2...c64b330 Reviewed By: hramos Differential Revision: D14862650 fbshipit-source-id: 350447246d26c69e7f462c5eb4e3ec02e99d05bb
Summary: This sync includes the following changes: - **[1b2159acc](facebook/react@1b2159acc )**: [React Native] measure calls will now call FabricUIManager (#15324) //<Eli White>// - **[c7a959982](facebook/react@c7a959982 )**: [React Native] Add tests to paper renderer for measure, measureLayout (#15323) //<Eli White>// - **[aece8119c](facebook/react@aece8119c )**: Refactor EventComponent logic + add onOwnershipChange callback (#15354) //<Dominic Gannaway>// - **[183d1f42e](facebook/react@183d1f42e )**: Fix: Measure expiration times relative to module initialization (#15357) //<Andrew Clark>// - **[b4bc33a58](facebook/react@b4bc33a58 )**: Fix areHookInputsEqual method warning params order (#15345) //<砖家>// - **[29fb5862f](facebook/react@29fb5862f )**: Move EventComponent state creation to complete phase + tests (#15352) //<Dominic Gannaway>// - **[745baf2e0](facebook/react@745baf2e0 )**: Provide new jsx transform target for reactjs/rfcs#107 (#15141) //<Ricky Vetter>// - **[81a61b1d1](facebook/react@81a61b1d1 )**: React events: add delay props to Press module (#15340) //<Nicolas Gallagher>// - **[4064ea9fa](facebook/react@4064ea9fa )**: Experimental event API: Support EventComponent onUnmount responder callback (#15335) //<Dominic Gannaway>// - **[4fbbae8af](facebook/react@4fbbae8af )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (#15308) //<Dominic Gannaway>// - **[958b6173f](facebook/react@958b6173f )**: Add delay props to Hover event module (#15325) //<Nicolas Gallagher>// - **[c3cc936da](facebook/react@c3cc936da )**: Add Hover,Focus,Press docs to REAMDE (#15328) //<Nicolas Gallagher>// - **[49595e921](facebook/react@49595e921 )**: [New Scheduler] Fix: Suspending an expired update (#15326) //<Andrew Clark>// - **[b93a8a9bb](facebook/react@b93a8a9bb )**: Experimental event API: refactor responder modules for lifecycle inclusion (#15322) //<Dominic Gannaway>// - **[937d262f5](facebook/react@937d262f5 )**: React events: keyboard press, types, tests (#15314) //<Nicolas Gallagher>// - **[7a2dc4853](facebook/react@7a2dc4853 )**: Allow DevTools to toggle Suspense fallbacks (#15232) //<Dan Abramov>// - **[43b1f74c8](facebook/react@43b1f74c8 )**: Alternate fix for #14198 //<Andrew Clark>// - **[41aa345d2](facebook/react@41aa345d2 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>// - **[6d0effad7](facebook/react@6d0effad7 )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (#15311) //<Andrew Clark>// - **[3a44ccefe](facebook/react@3a44ccefe )**: Fix feature flags react-dom/unstable-new-scheduler (#15309) //<Andrew Clark>// - **[92a1d8fea](facebook/react@92a1d8fea )**: mark react-events as private so we publish script skips it for now (#15307) //<Sunil Pai>// - **[e5c59359c](facebook/react@e5c59359c )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (#15305) //<Dan Abramov>// - **[73187239a](facebook/react@73187239a )**: writing unit tests in experimental event Drag API (#15297) //<Behzad Abbasi>// - **[89064fe68](facebook/react@89064fe68 )**: Adds displayName to EventComponent and EventTarget (#15268) //<Dominic Gannaway>// - **[fc6a9f1a1](facebook/react@fc6a9f1a1 )**: Add test for async event dispatching (#15300) //<Nicolas Gallagher>// - **[38fa84088](facebook/react@38fa84088 )**: Experiemental event API - wrap async dispatched events (#15299) //<Dominic Gannaway>// - **[4d5cb64aa](facebook/react@4d5cb64aa )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (#15151) //<Andrew Clark>// - **[aed0e1c30](facebook/react@aed0e1c30 )**: await act(async () => ...) (#14853) //<Sunil Pai>// - **[4c75881ee](facebook/react@4c75881ee )**: Remove maxDuration from tests (#15272) //<Sebastian Markbåge>// - **[9307932fe](facebook/react@9307932fe )**: Refactor event object creation for the experimental event API (#15295) //<Dominic Gannaway>// - **[6a1e6b2f7](facebook/react@6a1e6b2f7 )**: Experimental event API: loosen EventTarget constraints and warnings (#15292) //<Dominic Gannaway>// - **[f243deab8](facebook/react@f243deab8 )**: Add tests for Press responder event module (#15290) //<Nicolas Gallagher>// - **[296c4393d](facebook/react@296c4393d )**: Add Press event prop types and fix a check in Safari (#15288) //<Nicolas Gallagher>// - **[4482fdded](facebook/react@4482fdded )**: Fix host context issues around EventComponents and EventTargets (#15284) //<Dominic Gannaway>// - **[5ef0d1d29](facebook/react@5ef0d1d29 )**: Rename hover props in experimental event API and write unit tests (#15283) //<Behzad Abbasi>// - **[9444a5472](facebook/react@9444a5472 )**: Warn on nested EventTragets in experimental event API (#15287) //<Dominic Gannaway>// - **[7f1f5ddc3](facebook/react@7f1f5ddc3 )**: Rename press props in experimental event API (#15263) //<Nicolas Gallagher>// - **[2e02469fa](facebook/react@2e02469fa )**: ReactNative's ref.measureLayout now takes a ref (#15126) //<Eli White>// - **[1b94fd215](facebook/react@1b94fd215 )**: Make setNativeProps a no-op with Fabric renderer (#15094) //<Eli White>// - **[08055a625](facebook/react@08055a625 )**: Fix Press module in experimental event API (#15262) //<Nicolas Gallagher>// - **[f4625f518](facebook/react@f4625f518 )**: Fix on(Long)PressChange events in experimental press event API (#15256) //<Nicolas Gallagher>// - **[a41b21770](facebook/react@a41b21770 )**: Add additional event API responder surfaces (#15248) //<Dominic Gannaway>// - **[700f17be6](facebook/react@700f17be6 )**: Fix longpress in experimental Press event module (#15246) //<Nicolas Gallagher>// - **[5d336df70](facebook/react@5d336df70 )**: Allow for null targetFiber for root event handling (#15247) //<Dominic Gannaway>// - **[c6f3524df](facebook/react@c6f3524df )**: Adds React event component and React event target support to SSR renderer (#15242) //<Dominic Gannaway>// - **[c7a2dce50](facebook/react@c7a2dce50 )**: Disable JS urls at build level for www (#15230) //<Sebastian Markbåge>// - **[fb6b50871](facebook/react@fb6b50871 )**: Update versions for 16.8.6 //<Dan Abramov>// - **[1cfd25668](facebook/react@1cfd25668 )**: Fix circular module imports causing file size increase (#15231) //<Dominic Gannaway>// - **[669cafb36](facebook/react@669cafb36 )**: Adds experimental event component responder surfaces (#15228) //<Dominic Gannaway>// - **[d8cb10f11](facebook/react@d8cb10f11 )**: Enabled warnAboutDeprecatedLifecycles flag by default (#15186) //<Brian Vaughn>// - **[80f8b0d51](facebook/react@80f8b0d51 )**: Add part of the event responder system for experimental event API (#15179) //<Dominic Gannaway>// - **[5c2b2c085](facebook/react@5c2b2c085 )**: Warn about async infinite useEffect loop (#15180) //<Dan Abramov>// - **[8e9a013c0](facebook/react@8e9a013c0 )**: Release 16.8.5 //<Dan Abramov>// - **[f33e5790b](facebook/react@f33e5790b )**: [email protected] //<Dan Abramov>// - **[b1cccd1ed](facebook/react@b1cccd1ed )**: Warn about setState directly in dep-less useEffect (#15184) //<Dan Abramov>// - **[78f2775ed](facebook/react@78f2775ed )**: Flip event passive logic on passiveBrowserEventsSupported (#15190) //<Dominic Gannaway>// - **[f161ee2eb](facebook/react@f161ee2eb )**: React.warn() and React.error() (#15170) //<Brian Vaughn>// - **[78968bb3d](facebook/react@78968bb3d )**: Validate useEffect without deps too (#15183) //<Dan Abramov>// - **[4b8e1641b](facebook/react@4b8e1641b )**: Fork performWork instead of using boolean flag (#15169) //<Sebastian Markbåge>// - **[56035dac6](facebook/react@56035dac6 )**: unstable_Profiler -> Profiler (#15172) //<Brian Vaughn>// - **[31518135c](facebook/react@31518135c )**: Strengthen nested update counter test coverage (#15166) //<Dan Abramov>// - **[66f280c87](facebook/react@66f280c87 )**: Add internal logic for listening to event responders (#15168) //<Dominic Gannaway>// - **[b1a56abd6](facebook/react@b1a56abd6 )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>// - **[45f571736](facebook/react@45f571736 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>// - **[c05b4b81f](facebook/react@c05b4b81f )**: Link to useLayoutEffect gist in a warning (#15158) //<Dan Abramov>// - **[061d6ce3c](facebook/react@061d6ce3c )**: fix(react-dom): access iframe contentWindow instead of contentDocument (#15099) //<Renan Valentin>// - **[b83e01cad](facebook/react@b83e01cad )**: Adds more scaffolding for experimental event API (#15112) //<Dominic Gannaway>// - **[daeda44d8](facebook/react@daeda44d8 )**: Follow up to 15150 (#15152) //<Dominic Gannaway>// - **[acd65db5b](facebook/react@acd65db5b )**: Deprecate module pattern (factory) components (#15145) //<Sebastian Markbåge>// - **[55cc921c5](facebook/react@55cc921c5 )**: Adds react-events package for internal testing (#15150) //<Dominic Gannaway>// - **[7ad738630](facebook/react@7ad738630 )**: Improve warning for invalid class contextType (#15142) //<Dan Abramov>// - **[1e3364e76](facebook/react@1e3364e76 )**: Test that we don't suspend when disabling yielding (#15143) //<Sebastian Markbåge>// - **[42c3c967d](facebook/react@42c3c967d )**: Compile invariant directly to throw expressions (#15071) //<Andrew Clark>// - **[df7b87d25](facebook/react@df7b87d25 )**: Warn for Context.Consumer with contextType (#14831) //<Brandon Dail>// - **[2b93d686e](facebook/react@2b93d686e )**: Add more info to invalid hook call error message (#15139) //<Jared Palmer>// - **[d926936f0](facebook/react@d926936f0 )**: Eager bailout optimization should always compare to latest reducer (#15124) //<Andrew Clark>// - **[4162f6026](facebook/react@4162f6026 )**: Add feature flag to disable yielding (#15119) //<Sebastian Markbåge>// - **[8d60bd4dc](facebook/react@8d60bd4dc )**: [Shallow] Implement setState for Hooks and remount on type change (#15120) //<Dan Abramov>// - **[035e4cffb](facebook/react@035e4cffb )**: Change passive checker to use defineProperty (#15121) //<Dominic Gannaway>// - **[b283d75c1](facebook/react@b283d75c1 )**: Support React.memo in ReactShallowRenderer (#14816) //<Brandon Dail>// - **[f0621fe23](facebook/react@f0621fe23 )**: Use same example code for async effect warning (#15118) //<Dan Abramov>// - **[52c870c8d](facebook/react@52c870c8d )**: Fix shallow renderer not allowing hooks in forwardRef render functions (#15100) //<Sebastian Silbermann>// - **[f1ff4348c](facebook/react@f1ff4348c )**: Don't suggest a function as its own dep (#15115) //<Dan Abramov>// - **[371bbf36b](facebook/react@371bbf36b )**: Add infrastructure for passive/non-passive event support for future API exploration (#15036) //<Dominic Gannaway>// - **[ab5fe174c](facebook/react@ab5fe174c )**: Don't set the first option as selected in select tag with `size` attribute (#14242) //<Mateusz>// - **[935f60083](facebook/react@935f60083 )**: [email protected] //<Dan Abramov>// - **[0c03a4743](facebook/react@0c03a4743 )**: Adds experimental event API scaffolding (#15108) //<Dominic Gannaway>// - **[1204c7897](facebook/react@1204c7897 )**: [eslint] Wording tweaks (#15078) //<Sophie Alpert>// - **[9d77a317b](facebook/react@9d77a317b )**: Improve async useEffect warning (#15104) //<Dan Abramov>// - **[103378b1e](facebook/react@103378b1e )**: Warn for javascript: URLs in DOM sinks (#15047) //<Sebastian Markbåge>// - **[5d0c3c6c7](facebook/react@5d0c3c6c7 )**: [Partial Hydration] Render client-only content at normal priority (#15061) //<Sebastian Markbåge>// - **[6a4a261ee](facebook/react@6a4a261ee )**: Test suspended children are hidden before layout in persistent mode (#15030) //<Andrew Clark>// - **[bc8bd24c1](facebook/react@bc8bd24c1 )**: Run persistent mode tests in CI (#15029) //<Andrew Clark>// - **[3f4852fa5](facebook/react@3f4852fa5 )**: Run Placeholder tests in persistent mode, too (#15013) //<Andrew Clark>// - **[d0289c7e3](facebook/react@d0289c7e3 )**: [email protected] //<Dan Abramov>// - **[03ad9c73e](facebook/react@03ad9c73e )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (#15055) //<Dan Abramov>// - **[eb6247a9a](facebook/react@eb6247a9a )**: More concise messages (#15053) //<Dan Abramov>// - **[197703ecc](facebook/react@197703ecc )**: [ESLint] Add more hints to lint messages (#15046) //<Dan Abramov>// - **[6d2666bab](facebook/react@6d2666bab )**: Fix ESLint rule crash (#15044) //<Dan Abramov>// - **[9b7e1d138](facebook/react@9b7e1d138 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (#15026) //<Dan Abramov>// - **[1e3b6192b](facebook/react@1e3b6192b )**: Import Scheduler directly, not via host config (#14984) //<Andrew Clark>// - **[5d49dafac](facebook/react@5d49dafac )**: Enforce deps array in useMemo and useCallback (#15025) //<Dan Abramov>// - **[a9aa24ed8](facebook/react@a9aa24ed8 )**: 16.8.4 and changelog //<Brian Vaughn>// - **[fa5d4ee43](facebook/react@fa5d4ee43 )**: [ESLint] Treat functions that don't capture anything as static (#14996) //<Dan Abramov>// - **[fd557d453](facebook/react@fd557d453 )**: Warn on mount when deps are not an array (#15018) //<Dan Abramov>// - **[ce45ca9ba](facebook/react@ce45ca9ba )**: Prettier //<Andrew Clark>// - **[757a70b25](facebook/react@757a70b25 )**: ReactNoop.yield -> Scheduler.yieldValue (#15008) //<Andrew Clark>// - **[9d756d903](facebook/react@9d756d903 )**: Revert #14756 changes to ReactFiberScheduler (#14992) //<Andrew Clark>// - **[f16442a10](facebook/react@f16442a10 )**: [email protected] //<Dan Abramov>// - **[e1e45fb36](facebook/react@e1e45fb36 )**: [ESLint] Suggest to destructure props when they are only used as members (#14993) //<Dan Abramov>// - **[59ef28437](facebook/react@59ef28437 )**: Warn about dependencies outside of render scope (#14990) //<Dan Abramov>// - **[df7b4768c](facebook/react@df7b4768c )**: [ESLint] Deduplicate suggested dependencies (#14982) //<Dan Abramov>// - **[02404d793](facebook/react@02404d793 )**: Avoid dynamic dispatch for scheduler calls (#14968) //<Dan Abramov>// - **[bb2939ccc](facebook/react@bb2939ccc )**: Support editable useState hooks in DevTools (#14906) //<Brian Vaughn>// - **[69060e1da](facebook/react@69060e1da )**: Swap expect(ReactNoop) for expect(Scheduler) (#14971) //<Andrew Clark>// - **[ccb2a8a44](facebook/react@ccb2a8a44 )**: Replace test renderer's fake Scheduler implementation with mock build (#14970) //<Andrew Clark>// - **[53e787b45](facebook/react@53e787b45 )**: Replace noop's fake Scheduler implementation with mock Scheduler build (#14969) //<Andrew Clark>// - **[3ada82b74](facebook/react@3ada82b74 )**: Allow extraneous effect dependencies (#14967) //<Dan Abramov>// - **[00748c53e](facebook/react@00748c53e )**: Add new mock build of Scheduler with flush, yield API (#14964) //<Andrew Clark>// - **[4186952a6](facebook/react@4186952a6 )**: Fixed incompatibility between react-debug-tools and useContext() (#14940) //<Brian Vaughn>// - **[0b8efb229](facebook/react@0b8efb229 )**: Allow omitting constant primitive deps (#14959) //<Dan Abramov>// - **[875d05d55](facebook/react@875d05d55 )**: Include full error messages in React Native build (#15363) //<Andrew Clark>// - **[c64b33003](facebook/react@c64b33003 )**: Move EventTypes to ReactTypes (#15364) //<Dominic Gannaway>// - **[4c78ac0b9](facebook/react@4c78ac0b9 )**: Track Event Time as the Start Time for Suspense (#15358) //<Sebastian Markbåge>// Changelog: [General][Changed] - React sync for revisions 8e25ed2...c64b330 Reviewed By: hramos Differential Revision: D14862650 fbshipit-source-id: 350447246d26c69e7f462c5eb4e3ec02e99d05bb
Summary: This sync includes the following changes: - **[ec6691a68](facebook/react@ec6691a68 )**: Event API: remove isTargetDirectlyWithinEventComponent (#15546) //<Dominic Gannaway>// - **[a6e30001f](facebook/react@a6e30001f )**: Delete duplicate Focus.js (#15540) //<Dominic Gannaway>// - **[f7993d547](facebook/react@f7993d547 )**: Delete duplicate Hover.js (#15539) //<Dominic Gannaway>// - **[c8ee10037](facebook/react@c8ee10037 )**: Delete duplicate Swipe.js (#15541) //<Dominic Gannaway>// - **[494716c9b](facebook/react@494716c9b )**: Delete duplicate Drag.js (#15537) //<Dominic Gannaway>// - **[377846fef](facebook/react@377846fef )**: Delete duplicate Press.js (#15538) //<Dominic Gannaway>// - **[379515e83](facebook/react@379515e83 )**: Follow up to 15535 (#15536) //<Dominic Gannaway>// - **[bd88982fb](facebook/react@bd88982fb )**: Event API: use `capture` for all event listeners using experimental responder system (#15526) //<Dominic Gannaway>// - **[72ca3c60e](facebook/react@72ca3c60e )**: Bump scheduler version to 0.14.0 (#15395) //<Andrew Clark>// - **[7882c41f6](facebook/react@7882c41f6 )**: Use lowercase entry points for event modules (#15535) //<Andrew Clark>// - **[43c4e5f34](facebook/react@43c4e5f34 )**: Add method for forcing a lower framerate //<Nathan Schloss>// - **[1b752f191](facebook/react@1b752f191 )**: Fixed potential interaction tracing leak in Suspense thennable memoization (#15531) //<Brian Vaughn>// - **[12e5a13cf](facebook/react@12e5a13cf )**: [React Native] Inline calls to FabricUIManager in shared code (#15490) //<Eli White>// - **[2cca18728](facebook/react@2cca18728 )**: React Events: add onFocusVisibleChange to Focus (#15516) //<Nicolas Gallagher>// - **[cc5a49379](facebook/react@cc5a49379 )**: React Events: FocusScope tweaks and docs (#15515) //<Nicolas Gallagher>// - **[796c67a25](facebook/react@796c67a25 )**: Event API: responder event types should not re-register on EventComponent update (#15514) //<Dominic Gannaway>// - **[c4d1dcb53](facebook/react@c4d1dcb53 )**: React Events: core API documentation followup (#15506) //<Dominic Gannaway>// - **[41ef1961c](facebook/react@41ef1961c )**: Update TopLevelEventTypes.js (#15511) //<Dan Nate>// - **[7a482af5d](facebook/react@7a482af5d )**: Event API: Fix bug where Press root events were not being cleared (#15507) //<Dominic Gannaway>// - **[a14e24efa](facebook/react@a14e24efa )**: React Events: core API documentation (#15505) //<Nicolas Gallagher>// - **[8658611b6](facebook/react@8658611b6 )**: Event API: ensure event keys are unique + add validation (#15501) //<Dominic Gannaway>// - **[d9839740e](facebook/react@d9839740e )**: React events: remove unused types (#15503) //<Nicolas Gallagher>// - **[0b3431170](facebook/react@0b3431170 )**: React events: fix press end event dispatching (#15500) //<Nicolas Gallagher>// - **[d1f667acc](facebook/react@d1f667acc )**: Event API: follow up fixes for FocusScope + context changes (#15496) //<Dominic Gannaway>// - **[c530639dd](facebook/react@c530639dd )**: Minor code structure adjustments to the bundles.js file (#15079) //<Kunuk Nykjær>// - **[ed36df46c](facebook/react@ed36df46c )**: add --watch mode to "yarn build" (#15116) //<Alec Larson>// - **[793ef9b85](facebook/react@793ef9b85 )**: test(eslint-plugin-react-hooks): add coverage for unused custom hook (#15130) //<Redmond Tran>// - **[d61da9387](facebook/react@d61da9387 )**: test(accumulate): add test suite for accumulate function (#15159) //<Jeffrey Berry>// - **[a187e9b5e](facebook/react@a187e9b5e )**: React Native: Allow Views to be nested inside of Text (#15464) //<Adam Comella>// - **[f85aadefc](facebook/react@f85aadefc )**: ADD: disablePictureInPicture attribute for HTML5 videos (#15334) //<Radu-Sebastian Amarie>// - **[1eb2b892d](facebook/react@1eb2b892d )**: give `canUseDOM` with a possibility to be a constant (#14194) //<FUJI Goro>// - **[de26d6dd3](facebook/react@de26d6dd3 )**: typo fix (#15493) //<shubham>// - **[64e3da286](facebook/react@64e3da286 )**: Event API: Add `FocusScope` surface (#15487) //<Dominic Gannaway>// - **[3f058debc](facebook/react@3f058debc )**: Event API: various bug fixes (#15485) //<Dominic Gannaway>// - **[fb28e9048](facebook/react@fb28e9048 )**: Add missing word to code comment for clarity (#15443) //<Brendan McLoughlin>// - **[fa2fa3564](facebook/react@fa2fa3564 )**: Experimental event API: adds context.isTargetDirectlyWithinEventComponent (#15481) //<Dominic Gannaway>// - **[d3af2f2a5](facebook/react@d3af2f2a5 )**: Experimental Event API: add event component mount phase callback (#15480) //<Dominic Gannaway>// - **[ce126fbb2](facebook/react@ce126fbb2 )**: Fix priority inference of next level of work (#15478) //<Andrew Clark>// - **[71c8759ce](facebook/react@71c8759ce )**: Measure callback timeout relative to current time (#15479) //<Andrew Clark>// - **[9c6ff136c](facebook/react@9c6ff136c )**: Remove timeout from performance flamegraph (#15477) //<Andrew Clark>// - **[299a2714c](facebook/react@299a2714c )**: Use stricter equality check (#15474) //<Dan Abramov>// - **[017d6f14b](facebook/react@017d6f14b )**: Experimental Event API: add `rootEventTypes` support to event responders (#15475) //<Dominic Gannaway>// - **[784ebd8fa](facebook/react@784ebd8fa )**: Experimental event API: rework the propagation system for event components (#15462) //<Dominic Gannaway>// - **[587676900](facebook/react@587676900 )**: React events: initial implementation of disabled prop (#15458) //<Nicolas Gallagher>// - **[59c7aef91](facebook/react@59c7aef91 )**: React events: add a test for focusable descendants (#15457) //<Nicolas Gallagher>// - **[0a8da3391](facebook/react@0a8da3391 )**: React events: README update types and remove stopPropagation prop (#15456) //<Nicolas Gallagher>// - **[d584fcdc6](facebook/react@d584fcdc6 )**: React events: use passive events where possible (#15454) //<Nicolas Gallagher>// - **[051513bfa](facebook/react@051513bfa )**: React Events: consolidate logic for Press event component (#15451) //<Nicolas Gallagher>// - **[cdfce1ad2](facebook/react@cdfce1ad2 )**: React events: consolidate logic of Hover event component (#15450) //<Nicolas Gallagher>// - **[5857c89da](facebook/react@5857c89da )**: React events: extract common helper functions (#15449) //<Nicolas Gallagher>// - **[0b50fb29f](facebook/react@0b50fb29f )**: Include rootEventTypes in DOMEventResponderSystem stopPropagation tests (#15433) //<Nicolas Gallagher>// - **[1ae409d2c](facebook/react@1ae409d2c )**: React events: fix nested Hover components error (#15428) //<Nicolas Gallagher>// - **[c73ab39c1](facebook/react@c73ab39c1 )**: React events: make nested Focus work as expected (#15421) //<Nicolas Gallagher>// - **[4221565e1](facebook/react@4221565e1 )**: Cancel pending commit before starting on root //<Andrew Clark>// - **[9ebe1768a](facebook/react@9ebe1768a )**: Experimental Event API: Redesign event responder propagation (#15408) //<Dominic Gannaway>// - **[a30e7d992](facebook/react@a30e7d992 )**: act() tests - Reuse and properly unmount containers (#14974) //<Philipp Spiess>// - **[8cf963c6c](facebook/react@8cf963c6c )**: React events: ignore device buttons that aren't for primary interactions (#15402) //<Nicolas Gallagher>// - **[38bd570d4](facebook/react@38bd570d4 )**: Stop tracking bundle sizes (#15404) //<Andrew Clark>// - **[3438e5ce8](facebook/react@3438e5ce8 )**: Experimental Event API: Add Hover onUnmount support (#15394) //<Dominic Gannaway>// - **[805e7f873](facebook/react@805e7f873 )**: React events: add unmounting to Focus (#15396) //<Nicolas Gallagher>// - **[543353a04](facebook/react@543353a04 )**: Experimental Event API: Remove "listener" from event objects (#15391) //<Dominic Gannaway>// - **[9055e31e5](facebook/react@9055e31e5 )**: Replace old Fiber Scheduler with new one (#15387) //<Andrew Clark>// - **[4e59d4f5d](facebook/react@4e59d4f5d )**: React events: add onHoverMove support (#15388) //<Nicolas Gallagher>// - **[de7590327](facebook/react@de7590327 )**: Fix CI (#15393) //<Andrew Clark>// - **[687e4fb6f](facebook/react@687e4fb6f )**: Bump scheduler version to 0.14.0 //<Andrew Clark>// - **[45473c94c](facebook/react@45473c94c )**: React events: Press event fixes (#15386) //<Nicolas Gallagher>// - **[9672cf621](facebook/react@9672cf621 )**: Experimental Event API: adds `stopPropagation` by default to Press (#15384) //<Dominic Gannaway>// - **[a9eff329c](facebook/react@a9eff329c )**: Remove TouchHitTarget SSR logic to prevent issues with mouse events (#15381) //<Dominic Gannaway>// - **[c9841001b](facebook/react@c9841001b )**: Experimental Event API: preventDefault handling for anchors (#15383) //<Dominic Gannaway>// - **[c25c59c80](facebook/react@c25c59c80 )**: Apply the Just Noticeable Difference to suspense timeouts (#15367) //<Sebastian Markbåge>// - **[3e2e930d6](facebook/react@3e2e930d6 )**: Fixes a Flow type merge conflict (#15378) //<Dominic Gannaway>// - **[7fc91f17c](facebook/react@7fc91f17c )**: React events: add onPressMove and pressRetentionOffset to Press (#15374) //<Nicolas Gallagher>// - **[dd9cef9fc](facebook/react@dd9cef9fc )**: Experimental Event API: Add targets and responder utility method for finding targets (#15372) //<Dominic Gannaway>// - **[c64b33003](facebook/react@c64b33003 )**: Move EventTypes to ReactTypes (#15364) //<Dominic Gannaway>// - **[4c78ac0b9](facebook/react@4c78ac0b9 )**: Track Event Time as the Start Time for Suspense (#15358) //<Sebastian Markbåge>// - **[875d05d55](facebook/react@875d05d55 )**: Include full error messages in React Native build (#15363) //<Andrew Clark>// - **[1b2159acc](facebook/react@1b2159acc )**: [React Native] measure calls will now call FabricUIManager (#15324) //<Eli White>// - **[c7a959982](facebook/react@c7a959982 )**: [React Native] Add tests to paper renderer for measure, measureLayout (#15323) //<Eli White>// - **[aece8119c](facebook/react@aece8119c )**: Refactor EventComponent logic + add onOwnershipChange callback (#15354) //<Dominic Gannaway>// - **[183d1f42e](facebook/react@183d1f42e )**: Fix: Measure expiration times relative to module initialization (#15357) //<Andrew Clark>// - **[b4bc33a58](facebook/react@b4bc33a58 )**: Fix areHookInputsEqual method warning params order (#15345) //<砖家>// - **[29fb5862f](facebook/react@29fb5862f )**: Move EventComponent state creation to complete phase + tests (#15352) //<Dominic Gannaway>// - **[745baf2e0](facebook/react@745baf2e0 )**: Provide new jsx transform target for reactjs/rfcs#107 (#15141) //<Ricky Vetter>// - **[81a61b1d1](facebook/react@81a61b1d1 )**: React events: add delay props to Press module (#15340) //<Nicolas Gallagher>// - **[4064ea9fa](facebook/react@4064ea9fa )**: Experimental event API: Support EventComponent onUnmount responder callback (#15335) //<Dominic Gannaway>// - **[4fbbae8af](facebook/react@4fbbae8af )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (#15308) //<Dominic Gannaway>// - **[958b6173f](facebook/react@958b6173f )**: Add delay props to Hover event module (#15325) //<Nicolas Gallagher>// - **[c3cc936da](facebook/react@c3cc936da )**: Add Hover,Focus,Press docs to REAMDE (#15328) //<Nicolas Gallagher>// - **[49595e921](facebook/react@49595e921 )**: [New Scheduler] Fix: Suspending an expired update (#15326) //<Andrew Clark>// - **[b93a8a9bb](facebook/react@b93a8a9bb )**: Experimental event API: refactor responder modules for lifecycle inclusion (#15322) //<Dominic Gannaway>// - **[937d262f5](facebook/react@937d262f5 )**: React events: keyboard press, types, tests (#15314) //<Nicolas Gallagher>// - **[7a2dc4853](facebook/react@7a2dc4853 )**: Allow DevTools to toggle Suspense fallbacks (#15232) //<Dan Abramov>// - **[43b1f74c8](facebook/react@43b1f74c8 )**: Alternate fix for #14198 //<Andrew Clark>// - **[41aa345d2](facebook/react@41aa345d2 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>// - **[6d0effad7](facebook/react@6d0effad7 )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (#15311) //<Andrew Clark>// - **[3a44ccefe](facebook/react@3a44ccefe )**: Fix feature flags react-dom/unstable-new-scheduler (#15309) //<Andrew Clark>// - **[92a1d8fea](facebook/react@92a1d8fea )**: mark react-events as private so we publish script skips it for now (#15307) //<Sunil Pai>// - **[e5c59359c](facebook/react@e5c59359c )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (#15305) //<Dan Abramov>// - **[73187239a](facebook/react@73187239a )**: writing unit tests in experimental event Drag API (#15297) //<Behzad Abbasi>// - **[89064fe68](facebook/react@89064fe68 )**: Adds displayName to EventComponent and EventTarget (#15268) //<Dominic Gannaway>// - **[fc6a9f1a1](facebook/react@fc6a9f1a1 )**: Add test for async event dispatching (#15300) //<Nicolas Gallagher>// - **[38fa84088](facebook/react@38fa84088 )**: Experiemental event API - wrap async dispatched events (#15299) //<Dominic Gannaway>// - **[4d5cb64aa](facebook/react@4d5cb64aa )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (#15151) //<Andrew Clark>// - **[aed0e1c30](facebook/react@aed0e1c30 )**: await act(async () => ...) (#14853) //<Sunil Pai>// - **[4c75881ee](facebook/react@4c75881ee )**: Remove maxDuration from tests (#15272) //<Sebastian Markbåge>// - **[9307932fe](facebook/react@9307932fe )**: Refactor event object creation for the experimental event API (#15295) //<Dominic Gannaway>// - **[6a1e6b2f7](facebook/react@6a1e6b2f7 )**: Experimental event API: loosen EventTarget constraints and warnings (#15292) //<Dominic Gannaway>// - **[f243deab8](facebook/react@f243deab8 )**: Add tests for Press responder event module (#15290) //<Nicolas Gallagher>// - **[296c4393d](facebook/react@296c4393d )**: Add Press event prop types and fix a check in Safari (#15288) //<Nicolas Gallagher>// - **[4482fdded](facebook/react@4482fdded )**: Fix host context issues around EventComponents and EventTargets (#15284) //<Dominic Gannaway>// - **[5ef0d1d29](facebook/react@5ef0d1d29 )**: Rename hover props in experimental event API and write unit tests (#15283) //<Behzad Abbasi>// - **[9444a5472](facebook/react@9444a5472 )**: Warn on nested EventTragets in experimental event API (#15287) //<Dominic Gannaway>// - **[7f1f5ddc3](facebook/react@7f1f5ddc3 )**: Rename press props in experimental event API (#15263) //<Nicolas Gallagher>// - **[2e02469fa](facebook/react@2e02469fa )**: ReactNative's ref.measureLayout now takes a ref (#15126) //<Eli White>// - **[1b94fd215](facebook/react@1b94fd215 )**: Make setNativeProps a no-op with Fabric renderer (#15094) //<Eli White>// - **[08055a625](facebook/react@08055a625 )**: Fix Press module in experimental event API (#15262) //<Nicolas Gallagher>// - **[f4625f518](facebook/react@f4625f518 )**: Fix on(Long)PressChange events in experimental press event API (#15256) //<Nicolas Gallagher>// - **[a41b21770](facebook/react@a41b21770 )**: Add additional event API responder surfaces (#15248) //<Dominic Gannaway>// - **[700f17be6](facebook/react@700f17be6 )**: Fix longpress in experimental Press event module (#15246) //<Nicolas Gallagher>// - **[5d336df70](facebook/react@5d336df70 )**: Allow for null targetFiber for root event handling (#15247) //<Dominic Gannaway>// - **[c6f3524df](facebook/react@c6f3524df )**: Adds React event component and React event target support to SSR renderer (#15242) //<Dominic Gannaway>// - **[c7a2dce50](facebook/react@c7a2dce50 )**: Disable JS urls at build level for www (#15230) //<Sebastian Markbåge>// - **[fb6b50871](facebook/react@fb6b50871 )**: Update versions for 16.8.6 //<Dan Abramov>// - **[1cfd25668](facebook/react@1cfd25668 )**: Fix circular module imports causing file size increase (#15231) //<Dominic Gannaway>// - **[669cafb36](facebook/react@669cafb36 )**: Adds experimental event component responder surfaces (#15228) //<Dominic Gannaway>// - **[d8cb10f11](facebook/react@d8cb10f11 )**: Enabled warnAboutDeprecatedLifecycles flag by default (#15186) //<Brian Vaughn>// - **[80f8b0d51](facebook/react@80f8b0d51 )**: Add part of the event responder system for experimental event API (#15179) //<Dominic Gannaway>// - **[5c2b2c085](facebook/react@5c2b2c085 )**: Warn about async infinite useEffect loop (#15180) //<Dan Abramov>// - **[8e9a013c0](facebook/react@8e9a013c0 )**: Release 16.8.5 //<Dan Abramov>// - **[f33e5790b](facebook/react@f33e5790b )**: [email protected] //<Dan Abramov>// - **[b1cccd1ed](facebook/react@b1cccd1ed )**: Warn about setState directly in dep-less useEffect (#15184) //<Dan Abramov>// - **[78f2775ed](facebook/react@78f2775ed )**: Flip event passive logic on passiveBrowserEventsSupported (#15190) //<Dominic Gannaway>// - **[f161ee2eb](facebook/react@f161ee2eb )**: React.warn() and React.error() (#15170) //<Brian Vaughn>// - **[78968bb3d](facebook/react@78968bb3d )**: Validate useEffect without deps too (#15183) //<Dan Abramov>// - **[4b8e1641b](facebook/react@4b8e1641b )**: Fork performWork instead of using boolean flag (#15169) //<Sebastian Markbåge>// - **[56035dac6](facebook/react@56035dac6 )**: unstable_Profiler -> Profiler (#15172) //<Brian Vaughn>// - **[31518135c](facebook/react@31518135c )**: Strengthen nested update counter test coverage (#15166) //<Dan Abramov>// - **[66f280c87](facebook/react@66f280c87 )**: Add internal logic for listening to event responders (#15168) //<Dominic Gannaway>// - **[b1a56abd6](facebook/react@b1a56abd6 )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>// - **[45f571736](facebook/react@45f571736 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>// - **[c05b4b81f](facebook/react@c05b4b81f )**: Link to useLayoutEffect gist in a warning (#15158) //<Dan Abramov>// - **[061d6ce3c](facebook/react@061d6ce3c )**: fix(react-dom): access iframe contentWindow instead of contentDocument (#15099) //<Renan Valentin>// - **[b83e01cad](facebook/react@b83e01cad )**: Adds more scaffolding for experimental event API (#15112) //<Dominic Gannaway>// - **[daeda44d8](facebook/react@daeda44d8 )**: Follow up to 15150 (#15152) //<Dominic Gannaway>// - **[acd65db5b](facebook/react@acd65db5b )**: Deprecate module pattern (factory) components (#15145) //<Sebastian Markbåge>// - **[55cc921c5](facebook/react@55cc921c5 )**: Adds react-events package for internal testing (#15150) //<Dominic Gannaway>// - **[7ad738630](facebook/react@7ad738630 )**: Improve warning for invalid class contextType (#15142) //<Dan Abramov>// - **[1e3364e76](facebook/react@1e3364e76 )**: Test that we don't suspend when disabling yielding (#15143) //<Sebastian Markbåge>// - **[42c3c967d](facebook/react@42c3c967d )**: Compile invariant directly to throw expressions (#15071) //<Andrew Clark>// - **[df7b87d25](facebook/react@df7b87d25 )**: Warn for Context.Consumer with contextType (#14831) //<Brandon Dail>// - **[2b93d686e](facebook/react@2b93d686e )**: Add more info to invalid hook call error message (#15139) //<Jared Palmer>// - **[d926936f0](facebook/react@d926936f0 )**: Eager bailout optimization should always compare to latest reducer (#15124) //<Andrew Clark>// - **[4162f6026](facebook/react@4162f6026 )**: Add feature flag to disable yielding (#15119) //<Sebastian Markbåge>// - **[8d60bd4dc](facebook/react@8d60bd4dc )**: [Shallow] Implement setState for Hooks and remount on type change (#15120) //<Dan Abramov>// - **[035e4cffb](facebook/react@035e4cffb )**: Change passive checker to use defineProperty (#15121) //<Dominic Gannaway>// - **[b283d75c1](facebook/react@b283d75c1 )**: Support React.memo in ReactShallowRenderer (#14816) //<Brandon Dail>// - **[f0621fe23](facebook/react@f0621fe23 )**: Use same example code for async effect warning (#15118) //<Dan Abramov>// - **[52c870c8d](facebook/react@52c870c8d )**: Fix shallow renderer not allowing hooks in forwardRef render functions (#15100) //<Sebastian Silbermann>// - **[f1ff4348c](facebook/react@f1ff4348c )**: Don't suggest a function as its own dep (#15115) //<Dan Abramov>// - **[371bbf36b](facebook/react@371bbf36b )**: Add infrastructure for passive/non-passive event support for future API exploration (#15036) //<Dominic Gannaway>// - **[ab5fe174c](facebook/react@ab5fe174c )**: Don't set the first option as selected in select tag with `size` attribute (#14242) //<Mateusz>// - **[935f60083](facebook/react@935f60083 )**: [email protected] //<Dan Abramov>// - **[0c03a4743](facebook/react@0c03a4743 )**: Adds experimental event API scaffolding (#15108) //<Dominic Gannaway>// - **[1204c7897](facebook/react@1204c7897 )**: [eslint] Wording tweaks (#15078) //<Sophie Alpert>// - **[9d77a317b](facebook/react@9d77a317b )**: Improve async useEffect warning (#15104) //<Dan Abramov>// - **[103378b1e](facebook/react@103378b1e )**: Warn for javascript: URLs in DOM sinks (#15047) //<Sebastian Markbåge>// - **[5d0c3c6c7](facebook/react@5d0c3c6c7 )**: [Partial Hydration] Render client-only content at normal priority (#15061) //<Sebastian Markbåge>// - **[6a4a261ee](facebook/react@6a4a261ee )**: Test suspended children are hidden before layout in persistent mode (#15030) //<Andrew Clark>// - **[bc8bd24c1](facebook/react@bc8bd24c1 )**: Run persistent mode tests in CI (#15029) //<Andrew Clark>// - **[3f4852fa5](facebook/react@3f4852fa5 )**: Run Placeholder tests in persistent mode, too (#15013) //<Andrew Clark>// - **[d0289c7e3](facebook/react@d0289c7e3 )**: [email protected] //<Dan Abramov>// - **[03ad9c73e](facebook/react@03ad9c73e )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (#15055) //<Dan Abramov>// - **[eb6247a9a](facebook/react@eb6247a9a )**: More concise messages (#15053) //<Dan Abramov>// - **[197703ecc](facebook/react@197703ecc )**: [ESLint] Add more hints to lint messages (#15046) //<Dan Abramov>// - **[6d2666bab](facebook/react@6d2666bab )**: Fix ESLint rule crash (#15044) //<Dan Abramov>// - **[9b7e1d138](facebook/react@9b7e1d138 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (#15026) //<Dan Abramov>// - **[1e3b6192b](facebook/react@1e3b6192b )**: Import Scheduler directly, not via host config (#14984) //<Andrew Clark>// - **[5d49dafac](facebook/react@5d49dafac )**: Enforce deps array in useMemo and useCallback (#15025) //<Dan Abramov>// - **[a9aa24ed8](facebook/react@a9aa24ed8 )**: 16.8.4 and changelog //<Brian Vaughn>// - **[fa5d4ee43](facebook/react@fa5d4ee43 )**: [ESLint] Treat functions that don't capture anything as static (#14996) //<Dan Abramov>// - **[fd557d453](facebook/react@fd557d453 )**: Warn on mount when deps are not an array (#15018) //<Dan Abramov>// - **[ce45ca9ba](facebook/react@ce45ca9ba )**: Prettier //<Andrew Clark>// - **[757a70b25](facebook/react@757a70b25 )**: ReactNoop.yield -> Scheduler.yieldValue (#15008) //<Andrew Clark>// - **[9d756d903](facebook/react@9d756d903 )**: Revert #14756 changes to ReactFiberScheduler (#14992) //<Andrew Clark>// - **[f16442a10](facebook/react@f16442a10 )**: [email protected] //<Dan Abramov>// - **[e1e45fb36](facebook/react@e1e45fb36 )**: [ESLint] Suggest to destructure props when they are only used as members (#14993) //<Dan Abramov>// - **[59ef28437](facebook/react@59ef28437 )**: Warn about dependencies outside of render scope (#14990) //<Dan Abramov>// - **[df7b4768c](facebook/react@df7b4768c )**: [ESLint] Deduplicate suggested dependencies (#14982) //<Dan Abramov>// - **[02404d793](facebook/react@02404d793 )**: Avoid dynamic dispatch for scheduler calls (#14968) //<Dan Abramov>// - **[bb2939ccc](facebook/react@bb2939ccc )**: Support editable useState hooks in DevTools (#14906) //<Brian Vaughn>// - **[69060e1da](facebook/react@69060e1da )**: Swap expect(ReactNoop) for expect(Scheduler) (#14971) //<Andrew Clark>// - **[ccb2a8a44](facebook/react@ccb2a8a44 )**: Replace test renderer's fake Scheduler implementation with mock build (#14970) //<Andrew Clark>// - **[53e787b45](facebook/react@53e787b45 )**: Replace noop's fake Scheduler implementation with mock Scheduler build (#14969) //<Andrew Clark>// - **[3ada82b74](facebook/react@3ada82b74 )**: Allow extraneous effect dependencies (#14967) //<Dan Abramov>// - **[00748c53e](facebook/react@00748c53e )**: Add new mock build of Scheduler with flush, yield API (#14964) //<Andrew Clark>// - **[4186952a6](facebook/react@4186952a6 )**: Fixed incompatibility between react-debug-tools and useContext() (#14940) //<Brian Vaughn>// - **[0b8efb229](facebook/react@0b8efb229 )**: Allow omitting constant primitive deps (#14959) //<Dan Abramov>// Changelog: [General][Changed] - React sync for revisions 8e25ed2...ec6691a Follow steps in the [React Native test plan](https://our.intern.facebook.com/intern/dex/react/test-workflows-react-native/). Reviewed By: shergin Differential Revision: D15171103 fbshipit-source-id: d16b54dfd575b3a1fa38e6a132633f42c715b4fd
Summary: This sync includes the following changes: - **[ec6691a68](facebook/react@ec6691a68 )**: Event API: remove isTargetDirectlyWithinEventComponent (facebook#15546) //<Dominic Gannaway>// - **[a6e30001f](facebook/react@a6e30001f )**: Delete duplicate Focus.js (facebook#15540) //<Dominic Gannaway>// - **[f7993d547](facebook/react@f7993d547 )**: Delete duplicate Hover.js (facebook#15539) //<Dominic Gannaway>// - **[c8ee10037](facebook/react@c8ee10037 )**: Delete duplicate Swipe.js (facebook#15541) //<Dominic Gannaway>// - **[494716c9b](facebook/react@494716c9b )**: Delete duplicate Drag.js (facebook#15537) //<Dominic Gannaway>// - **[377846fef](facebook/react@377846fef )**: Delete duplicate Press.js (facebook#15538) //<Dominic Gannaway>// - **[379515e83](facebook/react@379515e83 )**: Follow up to 15535 (facebook#15536) //<Dominic Gannaway>// - **[bd88982fb](facebook/react@bd88982fb )**: Event API: use `capture` for all event listeners using experimental responder system (facebook#15526) //<Dominic Gannaway>// - **[72ca3c60e](facebook/react@72ca3c60e )**: Bump scheduler version to 0.14.0 (facebook#15395) //<Andrew Clark>// - **[7882c41f6](facebook/react@7882c41f6 )**: Use lowercase entry points for event modules (facebook#15535) //<Andrew Clark>// - **[43c4e5f34](facebook/react@43c4e5f34 )**: Add method for forcing a lower framerate //<Nathan Schloss>// - **[1b752f191](facebook/react@1b752f191 )**: Fixed potential interaction tracing leak in Suspense thennable memoization (facebook#15531) //<Brian Vaughn>// - **[12e5a13cf](facebook/react@12e5a13cf )**: [React Native] Inline calls to FabricUIManager in shared code (facebook#15490) //<Eli White>// - **[2cca18728](facebook/react@2cca18728 )**: React Events: add onFocusVisibleChange to Focus (facebook#15516) //<Nicolas Gallagher>// - **[cc5a49379](facebook/react@cc5a49379 )**: React Events: FocusScope tweaks and docs (facebook#15515) //<Nicolas Gallagher>// - **[796c67a25](facebook/react@796c67a25 )**: Event API: responder event types should not re-register on EventComponent update (facebook#15514) //<Dominic Gannaway>// - **[c4d1dcb53](facebook/react@c4d1dcb53 )**: React Events: core API documentation followup (facebook#15506) //<Dominic Gannaway>// - **[41ef1961c](facebook/react@41ef1961c )**: Update TopLevelEventTypes.js (facebook#15511) //<Dan Nate>// - **[7a482af5d](facebook/react@7a482af5d )**: Event API: Fix bug where Press root events were not being cleared (facebook#15507) //<Dominic Gannaway>// - **[a14e24efa](facebook/react@a14e24efa )**: React Events: core API documentation (facebook#15505) //<Nicolas Gallagher>// - **[8658611b6](facebook/react@8658611b6 )**: Event API: ensure event keys are unique + add validation (facebook#15501) //<Dominic Gannaway>// - **[d9839740e](facebook/react@d9839740e )**: React events: remove unused types (facebook#15503) //<Nicolas Gallagher>// - **[0b3431170](facebook/react@0b3431170 )**: React events: fix press end event dispatching (facebook#15500) //<Nicolas Gallagher>// - **[d1f667acc](facebook/react@d1f667acc )**: Event API: follow up fixes for FocusScope + context changes (facebook#15496) //<Dominic Gannaway>// - **[c530639dd](facebook/react@c530639dd )**: Minor code structure adjustments to the bundles.js file (facebook#15079) //<Kunuk Nykjær>// - **[ed36df46c](facebook/react@ed36df46c )**: add --watch mode to "yarn build" (facebook#15116) //<Alec Larson>// - **[793ef9b85](facebook/react@793ef9b85 )**: test(eslint-plugin-react-hooks): add coverage for unused custom hook (facebook#15130) //<Redmond Tran>// - **[d61da9387](facebook/react@d61da9387 )**: test(accumulate): add test suite for accumulate function (facebook#15159) //<Jeffrey Berry>// - **[a187e9b5e](facebook/react@a187e9b5e )**: React Native: Allow Views to be nested inside of Text (facebook#15464) //<Adam Comella>// - **[f85aadefc](facebook/react@f85aadefc )**: ADD: disablePictureInPicture attribute for HTML5 videos (facebook#15334) //<Radu-Sebastian Amarie>// - **[1eb2b892d](facebook/react@1eb2b892d )**: give `canUseDOM` with a possibility to be a constant (facebook#14194) //<FUJI Goro>// - **[de26d6dd3](facebook/react@de26d6dd3 )**: typo fix (facebook#15493) //<shubham>// - **[64e3da286](facebook/react@64e3da286 )**: Event API: Add `FocusScope` surface (facebook#15487) //<Dominic Gannaway>// - **[3f058debc](facebook/react@3f058debc )**: Event API: various bug fixes (facebook#15485) //<Dominic Gannaway>// - **[fb28e9048](facebook/react@fb28e9048 )**: Add missing word to code comment for clarity (facebook#15443) //<Brendan McLoughlin>// - **[fa2fa3564](facebook/react@fa2fa3564 )**: Experimental event API: adds context.isTargetDirectlyWithinEventComponent (facebook#15481) //<Dominic Gannaway>// - **[d3af2f2a5](facebook/react@d3af2f2a5 )**: Experimental Event API: add event component mount phase callback (facebook#15480) //<Dominic Gannaway>// - **[ce126fbb2](facebook/react@ce126fbb2 )**: Fix priority inference of next level of work (facebook#15478) //<Andrew Clark>// - **[71c8759ce](facebook/react@71c8759ce )**: Measure callback timeout relative to current time (facebook#15479) //<Andrew Clark>// - **[9c6ff136c](facebook/react@9c6ff136c )**: Remove timeout from performance flamegraph (facebook#15477) //<Andrew Clark>// - **[299a2714c](facebook/react@299a2714c )**: Use stricter equality check (facebook#15474) //<Dan Abramov>// - **[017d6f14b](facebook/react@017d6f14b )**: Experimental Event API: add `rootEventTypes` support to event responders (facebook#15475) //<Dominic Gannaway>// - **[784ebd8fa](facebook/react@784ebd8fa )**: Experimental event API: rework the propagation system for event components (facebook#15462) //<Dominic Gannaway>// - **[587676900](facebook/react@587676900 )**: React events: initial implementation of disabled prop (facebook#15458) //<Nicolas Gallagher>// - **[59c7aef91](facebook/react@59c7aef91 )**: React events: add a test for focusable descendants (facebook#15457) //<Nicolas Gallagher>// - **[0a8da3391](facebook/react@0a8da3391 )**: React events: README update types and remove stopPropagation prop (facebook#15456) //<Nicolas Gallagher>// - **[d584fcdc6](facebook/react@d584fcdc6 )**: React events: use passive events where possible (facebook#15454) //<Nicolas Gallagher>// - **[051513bfa](facebook/react@051513bfa )**: React Events: consolidate logic for Press event component (facebook#15451) //<Nicolas Gallagher>// - **[cdfce1ad2](facebook/react@cdfce1ad2 )**: React events: consolidate logic of Hover event component (facebook#15450) //<Nicolas Gallagher>// - **[5857c89da](facebook/react@5857c89da )**: React events: extract common helper functions (facebook#15449) //<Nicolas Gallagher>// - **[0b50fb29f](facebook/react@0b50fb29f )**: Include rootEventTypes in DOMEventResponderSystem stopPropagation tests (facebook#15433) //<Nicolas Gallagher>// - **[1ae409d2c](facebook/react@1ae409d2c )**: React events: fix nested Hover components error (facebook#15428) //<Nicolas Gallagher>// - **[c73ab39c1](facebook/react@c73ab39c1 )**: React events: make nested Focus work as expected (facebook#15421) //<Nicolas Gallagher>// - **[4221565e1](facebook/react@4221565e1 )**: Cancel pending commit before starting on root //<Andrew Clark>// - **[9ebe1768a](facebook/react@9ebe1768a )**: Experimental Event API: Redesign event responder propagation (facebook#15408) //<Dominic Gannaway>// - **[a30e7d992](facebook/react@a30e7d992 )**: act() tests - Reuse and properly unmount containers (facebook#14974) //<Philipp Spiess>// - **[8cf963c6c](facebook/react@8cf963c6c )**: React events: ignore device buttons that aren't for primary interactions (facebook#15402) //<Nicolas Gallagher>// - **[38bd570d4](facebook/react@38bd570d4 )**: Stop tracking bundle sizes (facebook#15404) //<Andrew Clark>// - **[3438e5ce8](facebook/react@3438e5ce8 )**: Experimental Event API: Add Hover onUnmount support (facebook#15394) //<Dominic Gannaway>// - **[805e7f873](facebook/react@805e7f873 )**: React events: add unmounting to Focus (facebook#15396) //<Nicolas Gallagher>// - **[543353a04](facebook/react@543353a04 )**: Experimental Event API: Remove "listener" from event objects (facebook#15391) //<Dominic Gannaway>// - **[9055e31e5](facebook/react@9055e31e5 )**: Replace old Fiber Scheduler with new one (facebook#15387) //<Andrew Clark>// - **[4e59d4f5d](facebook/react@4e59d4f5d )**: React events: add onHoverMove support (facebook#15388) //<Nicolas Gallagher>// - **[de7590327](facebook/react@de7590327 )**: Fix CI (facebook#15393) //<Andrew Clark>// - **[687e4fb6f](facebook/react@687e4fb6f )**: Bump scheduler version to 0.14.0 //<Andrew Clark>// - **[45473c94c](facebook/react@45473c94c )**: React events: Press event fixes (facebook#15386) //<Nicolas Gallagher>// - **[9672cf621](facebook/react@9672cf621 )**: Experimental Event API: adds `stopPropagation` by default to Press (facebook#15384) //<Dominic Gannaway>// - **[a9eff329c](facebook/react@a9eff329c )**: Remove TouchHitTarget SSR logic to prevent issues with mouse events (facebook#15381) //<Dominic Gannaway>// - **[c9841001b](facebook/react@c9841001b )**: Experimental Event API: preventDefault handling for anchors (facebook#15383) //<Dominic Gannaway>// - **[c25c59c80](facebook/react@c25c59c80 )**: Apply the Just Noticeable Difference to suspense timeouts (facebook#15367) //<Sebastian Markbåge>// - **[3e2e930d6](facebook/react@3e2e930d6 )**: Fixes a Flow type merge conflict (facebook#15378) //<Dominic Gannaway>// - **[7fc91f17c](facebook/react@7fc91f17c )**: React events: add onPressMove and pressRetentionOffset to Press (facebook#15374) //<Nicolas Gallagher>// - **[dd9cef9fc](facebook/react@dd9cef9fc )**: Experimental Event API: Add targets and responder utility method for finding targets (facebook#15372) //<Dominic Gannaway>// - **[c64b33003](facebook/react@c64b33003 )**: Move EventTypes to ReactTypes (facebook#15364) //<Dominic Gannaway>// - **[4c78ac0b9](facebook/react@4c78ac0b9 )**: Track Event Time as the Start Time for Suspense (facebook#15358) //<Sebastian Markbåge>// - **[875d05d55](facebook/react@875d05d55 )**: Include full error messages in React Native build (facebook#15363) //<Andrew Clark>// - **[1b2159acc](facebook/react@1b2159acc )**: [React Native] measure calls will now call FabricUIManager (facebook#15324) //<Eli White>// - **[c7a959982](facebook/react@c7a959982 )**: [React Native] Add tests to paper renderer for measure, measureLayout (facebook#15323) //<Eli White>// - **[aece8119c](facebook/react@aece8119c )**: Refactor EventComponent logic + add onOwnershipChange callback (facebook#15354) //<Dominic Gannaway>// - **[183d1f42e](facebook/react@183d1f42e )**: Fix: Measure expiration times relative to module initialization (facebook#15357) //<Andrew Clark>// - **[b4bc33a58](facebook/react@b4bc33a58 )**: Fix areHookInputsEqual method warning params order (facebook#15345) //<砖家>// - **[29fb5862f](facebook/react@29fb5862f )**: Move EventComponent state creation to complete phase + tests (facebook#15352) //<Dominic Gannaway>// - **[745baf2e0](facebook/react@745baf2e0 )**: Provide new jsx transform target for reactjs/rfcs#107 (facebook#15141) //<Ricky Vetter>// - **[81a61b1d1](facebook/react@81a61b1d1 )**: React events: add delay props to Press module (facebook#15340) //<Nicolas Gallagher>// - **[4064ea9fa](facebook/react@4064ea9fa )**: Experimental event API: Support EventComponent onUnmount responder callback (facebook#15335) //<Dominic Gannaway>// - **[4fbbae8af](facebook/react@4fbbae8af )**: Add full TouchHitTarget hit slop (experimental event API) to ReactDOM (facebook#15308) //<Dominic Gannaway>// - **[958b6173f](facebook/react@958b6173f )**: Add delay props to Hover event module (facebook#15325) //<Nicolas Gallagher>// - **[c3cc936da](facebook/react@c3cc936da )**: Add Hover,Focus,Press docs to REAMDE (facebook#15328) //<Nicolas Gallagher>// - **[49595e921](facebook/react@49595e921 )**: [New Scheduler] Fix: Suspending an expired update (facebook#15326) //<Andrew Clark>// - **[b93a8a9bb](facebook/react@b93a8a9bb )**: Experimental event API: refactor responder modules for lifecycle inclusion (facebook#15322) //<Dominic Gannaway>// - **[937d262f5](facebook/react@937d262f5 )**: React events: keyboard press, types, tests (facebook#15314) //<Nicolas Gallagher>// - **[7a2dc4853](facebook/react@7a2dc4853 )**: Allow DevTools to toggle Suspense fallbacks (facebook#15232) //<Dan Abramov>// - **[43b1f74c8](facebook/react@43b1f74c8 )**: Alternate fix for facebook#14198 //<Andrew Clark>// - **[41aa345d2](facebook/react@41aa345d2 )**: Fix a crash in Suspense with findDOMNode //<Dan Abramov>// - **[6d0effad7](facebook/react@6d0effad7 )**: Expose extra internals in FB build of react-dom/unstable-new-scheduler (facebook#15311) //<Andrew Clark>// - **[3a44ccefe](facebook/react@3a44ccefe )**: Fix feature flags react-dom/unstable-new-scheduler (facebook#15309) //<Andrew Clark>// - **[92a1d8fea](facebook/react@92a1d8fea )**: mark react-events as private so we publish script skips it for now (facebook#15307) //<Sunil Pai>// - **[e5c59359c](facebook/react@e5c59359c )**: Prevent bundling of Node polyfills when importing TestUtils/TestRenderer (facebook#15305) //<Dan Abramov>// - **[73187239a](facebook/react@73187239a )**: writing unit tests in experimental event Drag API (facebook#15297) //<Behzad Abbasi>// - **[89064fe68](facebook/react@89064fe68 )**: Adds displayName to EventComponent and EventTarget (facebook#15268) //<Dominic Gannaway>// - **[fc6a9f1a1](facebook/react@fc6a9f1a1 )**: Add test for async event dispatching (facebook#15300) //<Nicolas Gallagher>// - **[38fa84088](facebook/react@38fa84088 )**: Experiemental event API - wrap async dispatched events (facebook#15299) //<Dominic Gannaway>// - **[4d5cb64aa](facebook/react@4d5cb64aa )**: Rewrite ReactFiberScheduler for better integration with Scheduler package (facebook#15151) //<Andrew Clark>// - **[aed0e1c30](facebook/react@aed0e1c30 )**: await act(async () => ...) (facebook#14853) //<Sunil Pai>// - **[4c75881ee](facebook/react@4c75881ee )**: Remove maxDuration from tests (facebook#15272) //<Sebastian Markbåge>// - **[9307932fe](facebook/react@9307932fe )**: Refactor event object creation for the experimental event API (facebook#15295) //<Dominic Gannaway>// - **[6a1e6b2f7](facebook/react@6a1e6b2f7 )**: Experimental event API: loosen EventTarget constraints and warnings (facebook#15292) //<Dominic Gannaway>// - **[f243deab8](facebook/react@f243deab8 )**: Add tests for Press responder event module (facebook#15290) //<Nicolas Gallagher>// - **[296c4393d](facebook/react@296c4393d )**: Add Press event prop types and fix a check in Safari (facebook#15288) //<Nicolas Gallagher>// - **[4482fdded](facebook/react@4482fdded )**: Fix host context issues around EventComponents and EventTargets (facebook#15284) //<Dominic Gannaway>// - **[5ef0d1d29](facebook/react@5ef0d1d29 )**: Rename hover props in experimental event API and write unit tests (facebook#15283) //<Behzad Abbasi>// - **[9444a5472](facebook/react@9444a5472 )**: Warn on nested EventTragets in experimental event API (facebook#15287) //<Dominic Gannaway>// - **[7f1f5ddc3](facebook/react@7f1f5ddc3 )**: Rename press props in experimental event API (facebook#15263) //<Nicolas Gallagher>// - **[2e02469fa](facebook/react@2e02469fa )**: ReactNative's ref.measureLayout now takes a ref (facebook#15126) //<Eli White>// - **[1b94fd215](facebook/react@1b94fd215 )**: Make setNativeProps a no-op with Fabric renderer (facebook#15094) //<Eli White>// - **[08055a625](facebook/react@08055a625 )**: Fix Press module in experimental event API (facebook#15262) //<Nicolas Gallagher>// - **[f4625f518](facebook/react@f4625f518 )**: Fix on(Long)PressChange events in experimental press event API (facebook#15256) //<Nicolas Gallagher>// - **[a41b21770](facebook/react@a41b21770 )**: Add additional event API responder surfaces (facebook#15248) //<Dominic Gannaway>// - **[700f17be6](facebook/react@700f17be6 )**: Fix longpress in experimental Press event module (facebook#15246) //<Nicolas Gallagher>// - **[5d336df70](facebook/react@5d336df70 )**: Allow for null targetFiber for root event handling (facebook#15247) //<Dominic Gannaway>// - **[c6f3524df](facebook/react@c6f3524df )**: Adds React event component and React event target support to SSR renderer (facebook#15242) //<Dominic Gannaway>// - **[c7a2dce50](facebook/react@c7a2dce50 )**: Disable JS urls at build level for www (facebook#15230) //<Sebastian Markbåge>// - **[fb6b50871](facebook/react@fb6b50871 )**: Update versions for 16.8.6 //<Dan Abramov>// - **[1cfd25668](facebook/react@1cfd25668 )**: Fix circular module imports causing file size increase (facebook#15231) //<Dominic Gannaway>// - **[669cafb36](facebook/react@669cafb36 )**: Adds experimental event component responder surfaces (facebook#15228) //<Dominic Gannaway>// - **[d8cb10f11](facebook/react@d8cb10f11 )**: Enabled warnAboutDeprecatedLifecycles flag by default (facebook#15186) //<Brian Vaughn>// - **[80f8b0d51](facebook/react@80f8b0d51 )**: Add part of the event responder system for experimental event API (facebook#15179) //<Dominic Gannaway>// - **[5c2b2c085](facebook/react@5c2b2c085 )**: Warn about async infinite useEffect loop (facebook#15180) //<Dan Abramov>// - **[8e9a013c0](facebook/react@8e9a013c0 )**: Release 16.8.5 //<Dan Abramov>// - **[f33e5790b](facebook/react@f33e5790b )**: [email protected] //<Dan Abramov>// - **[b1cccd1ed](facebook/react@b1cccd1ed )**: Warn about setState directly in dep-less useEffect (facebook#15184) //<Dan Abramov>// - **[78f2775ed](facebook/react@78f2775ed )**: Flip event passive logic on passiveBrowserEventsSupported (facebook#15190) //<Dominic Gannaway>// - **[f161ee2eb](facebook/react@f161ee2eb )**: React.warn() and React.error() (facebook#15170) //<Brian Vaughn>// - **[78968bb3d](facebook/react@78968bb3d )**: Validate useEffect without deps too (facebook#15183) //<Dan Abramov>// - **[4b8e1641b](facebook/react@4b8e1641b )**: Fork performWork instead of using boolean flag (facebook#15169) //<Sebastian Markbåge>// - **[56035dac6](facebook/react@56035dac6 )**: unstable_Profiler -> Profiler (facebook#15172) //<Brian Vaughn>// - **[31518135c](facebook/react@31518135c )**: Strengthen nested update counter test coverage (facebook#15166) //<Dan Abramov>// - **[66f280c87](facebook/react@66f280c87 )**: Add internal logic for listening to event responders (facebook#15168) //<Dominic Gannaway>// - **[b1a56abd6](facebook/react@b1a56abd6 )**: Fork ReactFiberScheduler with feature flag //<Andrew Clark>// - **[45f571736](facebook/react@45f571736 )**: ReactFiberScheduler -> ReactFiberScheduler.old //<Andrew Clark>// - **[c05b4b81f](facebook/react@c05b4b81f )**: Link to useLayoutEffect gist in a warning (facebook#15158) //<Dan Abramov>// - **[061d6ce3c](facebook/react@061d6ce3c )**: fix(react-dom): access iframe contentWindow instead of contentDocument (facebook#15099) //<Renan Valentin>// - **[b83e01cad](facebook/react@b83e01cad )**: Adds more scaffolding for experimental event API (facebook#15112) //<Dominic Gannaway>// - **[daeda44d8](facebook/react@daeda44d8 )**: Follow up to 15150 (facebook#15152) //<Dominic Gannaway>// - **[acd65db5b](facebook/react@acd65db5b )**: Deprecate module pattern (factory) components (facebook#15145) //<Sebastian Markbåge>// - **[55cc921c5](facebook/react@55cc921c5 )**: Adds react-events package for internal testing (facebook#15150) //<Dominic Gannaway>// - **[7ad738630](facebook/react@7ad738630 )**: Improve warning for invalid class contextType (facebook#15142) //<Dan Abramov>// - **[1e3364e76](facebook/react@1e3364e76 )**: Test that we don't suspend when disabling yielding (facebook#15143) //<Sebastian Markbåge>// - **[42c3c967d](facebook/react@42c3c967d )**: Compile invariant directly to throw expressions (facebook#15071) //<Andrew Clark>// - **[df7b87d25](facebook/react@df7b87d25 )**: Warn for Context.Consumer with contextType (facebook#14831) //<Brandon Dail>// - **[2b93d686e](facebook/react@2b93d686e )**: Add more info to invalid hook call error message (facebook#15139) //<Jared Palmer>// - **[d926936f0](facebook/react@d926936f0 )**: Eager bailout optimization should always compare to latest reducer (facebook#15124) //<Andrew Clark>// - **[4162f6026](facebook/react@4162f6026 )**: Add feature flag to disable yielding (facebook#15119) //<Sebastian Markbåge>// - **[8d60bd4dc](facebook/react@8d60bd4dc )**: [Shallow] Implement setState for Hooks and remount on type change (facebook#15120) //<Dan Abramov>// - **[035e4cffb](facebook/react@035e4cffb )**: Change passive checker to use defineProperty (facebook#15121) //<Dominic Gannaway>// - **[b283d75c1](facebook/react@b283d75c1 )**: Support React.memo in ReactShallowRenderer (facebook#14816) //<Brandon Dail>// - **[f0621fe23](facebook/react@f0621fe23 )**: Use same example code for async effect warning (facebook#15118) //<Dan Abramov>// - **[52c870c8d](facebook/react@52c870c8d )**: Fix shallow renderer not allowing hooks in forwardRef render functions (facebook#15100) //<Sebastian Silbermann>// - **[f1ff4348c](facebook/react@f1ff4348c )**: Don't suggest a function as its own dep (facebook#15115) //<Dan Abramov>// - **[371bbf36b](facebook/react@371bbf36b )**: Add infrastructure for passive/non-passive event support for future API exploration (facebook#15036) //<Dominic Gannaway>// - **[ab5fe174c](facebook/react@ab5fe174c )**: Don't set the first option as selected in select tag with `size` attribute (facebook#14242) //<Mateusz>// - **[935f60083](facebook/react@935f60083 )**: [email protected] //<Dan Abramov>// - **[0c03a4743](facebook/react@0c03a4743 )**: Adds experimental event API scaffolding (facebook#15108) //<Dominic Gannaway>// - **[1204c7897](facebook/react@1204c7897 )**: [eslint] Wording tweaks (facebook#15078) //<Sophie Alpert>// - **[9d77a317b](facebook/react@9d77a317b )**: Improve async useEffect warning (facebook#15104) //<Dan Abramov>// - **[103378b1e](facebook/react@103378b1e )**: Warn for javascript: URLs in DOM sinks (facebook#15047) //<Sebastian Markbåge>// - **[5d0c3c6c7](facebook/react@5d0c3c6c7 )**: [Partial Hydration] Render client-only content at normal priority (facebook#15061) //<Sebastian Markbåge>// - **[6a4a261ee](facebook/react@6a4a261ee )**: Test suspended children are hidden before layout in persistent mode (facebook#15030) //<Andrew Clark>// - **[bc8bd24c1](facebook/react@bc8bd24c1 )**: Run persistent mode tests in CI (facebook#15029) //<Andrew Clark>// - **[3f4852fa5](facebook/react@3f4852fa5 )**: Run Placeholder tests in persistent mode, too (facebook#15013) //<Andrew Clark>// - **[d0289c7e3](facebook/react@d0289c7e3 )**: [email protected] //<Dan Abramov>// - **[03ad9c73e](facebook/react@03ad9c73e )**: [ESLint] Tweak setState updater message and add useEffect(async) warning (facebook#15055) //<Dan Abramov>// - **[eb6247a9a](facebook/react@eb6247a9a )**: More concise messages (facebook#15053) //<Dan Abramov>// - **[197703ecc](facebook/react@197703ecc )**: [ESLint] Add more hints to lint messages (facebook#15046) //<Dan Abramov>// - **[6d2666bab](facebook/react@6d2666bab )**: Fix ESLint rule crash (facebook#15044) //<Dan Abramov>// - **[9b7e1d138](facebook/react@9b7e1d138 )**: [ESLint] Suggest moving inside a Hook or useCallback when bare function is a dependency (facebook#15026) //<Dan Abramov>// - **[1e3b6192b](facebook/react@1e3b6192b )**: Import Scheduler directly, not via host config (facebook#14984) //<Andrew Clark>// - **[5d49dafac](facebook/react@5d49dafac )**: Enforce deps array in useMemo and useCallback (facebook#15025) //<Dan Abramov>// - **[a9aa24ed8](facebook/react@a9aa24ed8 )**: 16.8.4 and changelog //<Brian Vaughn>// - **[fa5d4ee43](facebook/react@fa5d4ee43 )**: [ESLint] Treat functions that don't capture anything as static (facebook#14996) //<Dan Abramov>// - **[fd557d453](facebook/react@fd557d453 )**: Warn on mount when deps are not an array (facebook#15018) //<Dan Abramov>// - **[ce45ca9ba](facebook/react@ce45ca9ba )**: Prettier //<Andrew Clark>// - **[757a70b25](facebook/react@757a70b25 )**: ReactNoop.yield -> Scheduler.yieldValue (facebook#15008) //<Andrew Clark>// - **[9d756d903](facebook/react@9d756d903 )**: Revert facebook#14756 changes to ReactFiberScheduler (facebook#14992) //<Andrew Clark>// - **[f16442a10](facebook/react@f16442a10 )**: [email protected] //<Dan Abramov>// - **[e1e45fb36](facebook/react@e1e45fb36 )**: [ESLint] Suggest to destructure props when they are only used as members (facebook#14993) //<Dan Abramov>// - **[59ef28437](facebook/react@59ef28437 )**: Warn about dependencies outside of render scope (facebook#14990) //<Dan Abramov>// - **[df7b4768c](facebook/react@df7b4768c )**: [ESLint] Deduplicate suggested dependencies (facebook#14982) //<Dan Abramov>// - **[02404d793](facebook/react@02404d793 )**: Avoid dynamic dispatch for scheduler calls (facebook#14968) //<Dan Abramov>// - **[bb2939ccc](facebook/react@bb2939ccc )**: Support editable useState hooks in DevTools (facebook#14906) //<Brian Vaughn>// - **[69060e1da](facebook/react@69060e1da )**: Swap expect(ReactNoop) for expect(Scheduler) (facebook#14971) //<Andrew Clark>// - **[ccb2a8a44](facebook/react@ccb2a8a44 )**: Replace test renderer's fake Scheduler implementation with mock build (facebook#14970) //<Andrew Clark>// - **[53e787b45](facebook/react@53e787b45 )**: Replace noop's fake Scheduler implementation with mock Scheduler build (facebook#14969) //<Andrew Clark>// - **[3ada82b74](facebook/react@3ada82b74 )**: Allow extraneous effect dependencies (facebook#14967) //<Dan Abramov>// - **[00748c53e](facebook/react@00748c53e )**: Add new mock build of Scheduler with flush, yield API (facebook#14964) //<Andrew Clark>// - **[4186952a6](facebook/react@4186952a6 )**: Fixed incompatibility between react-debug-tools and useContext() (facebook#14940) //<Brian Vaughn>// - **[0b8efb229](facebook/react@0b8efb229 )**: Allow omitting constant primitive deps (facebook#14959) //<Dan Abramov>// Changelog: [General][Changed] - React sync for revisions 8e25ed2...ec6691a Follow steps in the [React Native test plan](https://our.intern.facebook.com/intern/dex/react/test-workflows-react-native/). Reviewed By: shergin Differential Revision: D15171103 fbshipit-source-id: d16b54dfd575b3a1fa38e6a132633f42c715b4fd # Conflicts: # package.json # yarn.lock
Motivation
As I was working on mimicking iOS animations for my ongoing work with
react-navigation
, one task I had was to match the "push from right" animation that is common in UINavigationController.I was able to grab the exact animation values for this animation with some LLDB magic, and found that the screen is animated using a
CASpringAnimation
with the parameters:After spending a considerable amount of time attempting to replicate the spring created with these values by CASpringAnimation by specifying values for tension and friction in the current
Animated.spring
implementation, I was unable to come up with mathematically equivalent values that could replicate the spring exactly.After doing some research, I ended up disassembling the QuartzCore framework, reading the assembly, and determined that Apple's implementation of
CASpringAnimation
does not use an integrated, numerical animation model as we do in Animated.spring, but instead solved for the closed form of the equations that govern damped harmonic oscillation (the differential equations themselves are here, and a paper describing the math to arrive at the closed-form solution to the second-order ODE that describes the DHO is here).Though we can get the currently implemented RK4 integration close by tweaking some values, it is, the current model is at it's core, an approximation. It seemed that if I wanted to implement the
CASpringAnimation
behavior exactly, I needed to implement the analytical model (as is implemented inCASpringAnimation
) inAnimated
.Implementation
We add three new optional parameters to
Animated.spring
(to both the JS and native implementations):stiffness
, a value describing the spring's stiffness coefficientdamping
, a value defining how the spring's motion should be damped due to the forces of friction (technically called the viscous damping coefficient).mass
, a value describing the mass of the object attached to the end of the simulated springJust like if a developer were to specify
bounciness
/speed
andtension
/friction
in the same config, specifying any of these new parameters while also specifying the aforementioned config values will cause an error to be thrown.Defaults forAnimated.spring
across all three implementations (JS/iOS/Android) stay the same, so this is intended to be a non-breaking change.Ifstiffness
,damping
, ormass
are provided in the config, we switch to animating the spring with the new damped harmonic oscillator model (DHO
as described in the code).We replace the old RK4 integration implementation with our new analytic implementation. Tension/friction nicely correspond directly to stiffness/damping with the mass of the spring locked at 1. This is intended to be a non-breaking change, but there may be very slight differences in people's springs (maybe not even noticeable to the naked eye), given the fact that this implementation is more accurate.
The DHO animation algorithm will calculate the position of the spring at time t explicitly and in an analytical fashion, and use this calculation to update the animation's value. It will also analytically calculate the velocity at time t, so as to allow animated value tracking to continue to work as expected.
Also, docs have been updated to cover the new configuration options (and also I added docs for Animated configuration options that were missing, such as
restDisplacementThreshold
, etc).Test Plan
Run tests. Run "Animated Gratuitous App" and "NativeAnimation" example in RNTester.