Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach Listeners Eagerly to Roots and Portal Containers #19659

Merged
merged 4 commits into from Aug 24, 2020
Merged

Conversation

@gaearon
Copy link
Member

@gaearon gaearon commented Aug 20, 2020

Fixes #19608.

It uncovered a flaw in our current bubbling strategy: if the portal tree doesn't have a particular listener (e.g. onClick), but the parent tree does, the event doesn't bubble (because we don't listen to that even on the portal container node).

This fix is to listen to all supported events at the time the root or the portal container are attached. This means we need to know all of them ahead of time, but we already do.

I added a new flag called enableEagerRootListeners that turns this change on (set to false everywhere except WWW where it's dynamic). All of the existing behavior is behind its falsy branch since we'd like a safety net. I edited all existing codesites that are branch-specific to be wrapped so they're easy to find and delete later, whichever way we decide to go.

Aside from fixing #19608, this change also has a few other benefits:

  • It surfaces less common conditions more reliably (e.g. it uncovered #19672 and that event replaying has regressed for capture events)
  • It aligns the behavior closer between modes when Event Replaying is on and off
  • It makes issues like http://github.com/facebook/react/issues/3639 impossible.
  • While it adds some extra work for each root and portal container, it only happens once, but it removes all the CPU work (including Map accesses) we're currently doing for every event listener on every render.

The downside of this change is that it makes createEventHandle less powerful, as it would only work for known events. However, the list of known events is finite, and we can manually add the missing ones if there is a need. Behind the flag, I've made it throw for unknown events.

This also introduces some risk in case browsers do something unfortunate when a particular event is registered. (However, this would have already been the case for when you eventually add an event handler somewhere deep.) At least with the Passive flag on the bad ones should be mitigated.

Review without whitespace: https://github.com/facebook/react/pull/19659/files?w=1

@codesandbox
Copy link

@codesandbox codesandbox bot commented Aug 20, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 46ee6be:

Sandbox Source
React Configuration
great-bell-nptin Issue #19608
@sizebot
Copy link

@sizebot sizebot commented Aug 20, 2020

Details of bundled changes.

Comparing: 90d212d...46ee6be

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% +0.1% 881.27 KB 881.99 KB 201.58 KB 201.71 KB NODE_DEV
ReactDOMForked-prod.js 🔺+0.7% 🔺+0.8% 393.84 KB 396.54 KB 72.27 KB 72.84 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 137.08 KB 137.08 KB 36.38 KB 36.38 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 119.73 KB 119.78 KB 38.54 KB 38.56 KB NODE_PROD
ReactDOMForked-profiling.js +0.7% +0.7% 407.41 KB 410.11 KB 74.74 KB 75.27 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 143.16 KB 143.16 KB 36.58 KB 36.58 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.83 KB 12.83 KB 5.04 KB 5.04 KB UMD_PROD
ReactDOMTesting-dev.js +0.1% +0.1% 952.11 KB 952.97 KB 213.14 KB 213.3 KB FB_WWW_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 393.4 KB 393.49 KB 73.6 KB 73.62 KB FB_WWW_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 12.67 KB 12.67 KB 4.96 KB 4.96 KB NODE_PROD
ReactTestUtils-dev.js +0.1% +0.1% 55.55 KB 55.62 KB 15.58 KB 15.6 KB FB_WWW_DEV
react-dom.development.js +0.1% +0.1% 925.84 KB 926.66 KB 204.04 KB 204.19 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.68 KB 119.74 KB 39.28 KB 39.27 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.59 KB 123.65 KB 40.48 KB 40.5 KB UMD_PROFILING
ReactDOMForked-dev.js +0.4% +0.5% 995.23 KB 999.68 KB 220.38 KB 221.58 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 123.8 KB 123.85 KB 39.8 KB 39.81 KB NODE_PROFILING
ReactDOM-dev.js +0.5% +0.5% 988.5 KB 992.95 KB 219.44 KB 220.63 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.7% 🔺+0.7% 390.31 KB 393.01 KB 71.58 KB 72.12 KB FB_WWW_PROD
ReactDOM-profiling.js +0.7% +0.7% 403.44 KB 406.14 KB 73.99 KB 74.53 KB FB_WWW_PROFILING
ReactDOMServer-dev.js +0.1% +0.1% 145.53 KB 145.61 KB 37.3 KB 37.32 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 66.09 KB 66.09 KB 18.23 KB 18.23 KB UMD_DEV

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 46ee6be

@sizebot
Copy link

@sizebot sizebot commented Aug 20, 2020

Details of bundled changes.

Comparing: 90d212d...46ee6be

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% +0.1% 917.02 KB 917.74 KB 208.09 KB 208.23 KB NODE_DEV
ReactDOMForked-prod.js 🔺+0.7% 🔺+0.8% 382.67 KB 385.37 KB 70.52 KB 71.09 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% -0.0% 138.59 KB 138.59 KB 36.59 KB 36.59 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 124.35 KB 124.4 KB 39.91 KB 39.92 KB NODE_PROD
ReactDOMForked-profiling.js +0.7% +0.8% 396.2 KB 398.9 KB 73 KB 73.56 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% -0.0% 144.74 KB 144.74 KB 36.78 KB 36.78 KB UMD_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 20.66 KB 20.66 KB 7.65 KB 7.65 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 12.85 KB 12.85 KB 5.05 KB 5.05 KB UMD_PROD
ReactDOMTesting-dev.js +0.1% +0.1% 924.03 KB 924.89 KB 207.64 KB 207.81 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 61.1 KB 61.1 KB 17.75 KB 17.75 KB NODE_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 380.76 KB 380.84 KB 71.53 KB 71.55 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.52 KB 5.52 KB 1.84 KB 1.84 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.68 KB 12.68 KB 4.97 KB 4.97 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.17 KB 1.17 KB 666 B 665 B NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.22 KB 1.22 KB 712 B 710 B UMD_PROD
ReactTestUtils-dev.js +0.1% +0.1% 55.55 KB 55.62 KB 15.59 KB 15.61 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 4.78 KB 4.78 KB 1.68 KB 1.68 KB NODE_DEV
react-dom.development.js +0.1% +0.1% 963.36 KB 964.17 KB 210.68 KB 210.83 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.01 KB 1.01 KB 616 B 614 B NODE_PROD
react-dom.production.min.js 0.0% 0.0% 124.25 KB 124.3 KB 40.67 KB 40.68 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 129.51 KB 129.56 KB 42.3 KB 42.3 KB UMD_PROFILING
ReactDOMForked-dev.js +0.5% +0.5% 969.71 KB 974.16 KB 215.58 KB 216.72 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 129.8 KB 129.85 KB 41.53 KB 41.54 KB NODE_PROFILING
react-dom-server.browser.production.min.js 0.0% -0.0% 20.34 KB 20.34 KB 7.54 KB 7.54 KB UMD_PROD
ReactDOM-dev.js +0.5% +0.5% 962.98 KB 967.43 KB 214.72 KB 215.87 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.7% 🔺+0.7% 379.15 KB 381.85 KB 69.9 KB 70.41 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% -0.0% 137.32 KB 137.32 KB 36.34 KB 36.34 KB NODE_DEV
ReactDOM-profiling.js +0.7% +0.7% 392.23 KB 394.93 KB 72.28 KB 72.83 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% -0.0% 20.24 KB 20.24 KB 7.5 KB 7.5 KB NODE_PROD
ReactDOMServer-dev.js +0.1% +0.1% 141.5 KB 141.58 KB 36.29 KB 36.31 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 66.1 KB 66.1 KB 18.24 KB 18.24 KB UMD_DEV

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 46ee6be

@gaearon gaearon force-pushed the gaearon:evv branch 9 times, most recently from 59f2795 to 2252c63 Aug 20, 2020
@gaearon gaearon changed the title (WIP) Attach listeners eagerly Attach Listeners Eagerly to Roots and Portal Containers Aug 21, 2020
@gaearon gaearon force-pushed the gaearon:evv branch 3 times, most recently from 2bf6238 to 6c6ddd7 Aug 21, 2020
@gaearon gaearon force-pushed the gaearon:evv branch from 6c6ddd7 to 49216d6 Aug 21, 2020
@gaearon gaearon marked this pull request as ready for review Aug 21, 2020
@gaearon gaearon requested a review from sebmarkbage Aug 21, 2020
@@ -327,6 +329,41 @@ export function listenToNonDelegatedEvent(
}
}

const listeningMarker =

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Want to have a flag, but one per React copy. To guard around cases like "rendering a portal into a div managed by another React".

This comment has been minimized.

@trueadm

trueadm Aug 21, 2020
Member

Please can you explain more about why we need a marker?

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

We need to mark a node as processed so we don’t keep adding more and more listeners to it every time. Like you mentioned below.

But we need to mark it with a field that’s local to this copy of React. In case two copies use the same portal container. You don’t want one of them to prevent another from adding listeners.

There’s a test that fails if we don’t do this (although it reproduces this problem mostly by accident due to resetModules and a shared container).

This comment has been minimized.

@rickhanlonii

rickhanlonii Aug 24, 2020
Member

Should we copy the test and scope it to this use case? It sounds like that test could change and we would lose the regression test here.

if (!enableEagerRootListeners) {
ensureListeningTo(rootContainerElement, propKey, domElement);
} else if (propKey === 'onScroll') {
listenToNonDelegatedEvent('scroll', domElement);

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Can't avoid for scroll since it only bubbles to document.


export function listenToAllSupportedEvents(rootContainerElement: EventTarget) {
if (enableEagerRootListeners) {
if ((rootContainerElement: any)[listeningMarker]) {

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Only do this once per container.

This comment has been minimized.

@rickhanlonii

rickhanlonii Aug 24, 2020
Member

What if we only did this once per event per container? Would that allow us to attach custom events lazily later?

null,
);
}
listenToNativeEvent(

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Capture phase.


if (enableEagerRootListeners) {
for (let i = 0; i < dependencies.length; i++) {
allNativeEvents.add(dependencies[i]);

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Make a list once when registering plugins. Then use it for any root. Assumed not to change.

) {
return;
if (!enableEagerRootListeners) {
const eventListenerMap = getEventListenerMap(targetContainer);

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

Don't need to do this anymore since it can't happen with eager listeners.

This comment has been minimized.

@trueadm

trueadm Aug 21, 2020
Member

Most likely not, but we can always remove this later. Less changes at once make it easier to identify possible issues.

This comment has been minimized.

@gaearon

gaearon Aug 21, 2020
Author Member

I mean it doesn’t work unless I remove it because that condition no longer makes sense (we don’t fill the map anymore with React event names).

We could fill the map of course but that would complicate the code and the condition would always be false anyway because the onSelect event would by definition always be there.

@trueadm
Copy link
Member

@trueadm trueadm commented Aug 21, 2020

The downside of this change is that it makes createEventHandle less powerful, as it would only work for known events. However, the list of known events is finite, and we can manually add the missing ones if there is a need. (Maybe it's worth adding a warning if you register an unknown one?)

So does this mean that createEventHandle no longer supports custom events with the changes in this PR?

@gaearon
Copy link
Member Author

@gaearon gaearon commented Aug 21, 2020

So does this mean that createEventHandle no longer supports custom events with the changes in this PR?

It doesn't support events that are not listed in registered as top level listeners, correct.

However, if there are specific events we want to support, we can add them to the list just for that purpose. (I've checked our existing usages and haven't found any that are being used.)

@trueadm
Copy link
Member

@trueadm trueadm commented Aug 21, 2020

In the case of having a portal on the same node, do we ensure we don't add the event listeners multiple times? i.e. ReactDOM.createPortal(..., document.body)

@gaearon
Copy link
Member Author

@gaearon gaearon commented Aug 21, 2020

Yeah, there's a check that marks the node as already having the listeners (per copy of React).

@trueadm
Copy link
Member

@trueadm trueadm commented Aug 21, 2020

However, if there are specific events we want to support, we can add them to the list just for that purpose. (I've checked our existing usages and haven't found any that are being used.)

We should definitely add a warning here then. Also, why doens't the custom event test in DOMPluginEventSystem-test.internal.js fail?

@gaearon
Copy link
Member Author

@gaearon gaearon commented Aug 21, 2020

Also, why isn't the custom event test in DOMPluginEventSystem-test.internal.js fail?

Probably because I haven't completely removed the lazy mechanism, so it sort of works but is still broken for propagation through portals. I think adding a warning makes sense to me. I will do that.

Copy link
Member

@sebmarkbage sebmarkbage left a comment

didnotread

@gaearon gaearon force-pushed the gaearon:evv branch from 9ba19a1 to 8b92d4a Aug 24, 2020
gaearon added 2 commits Aug 24, 2020
We can't support this without adding more complexity. It's not clear that this is even desirable, as none of our existing use cases need custom events. This API primarily exists as a deprecation strategy for Flare, so I don't think it is important to expand its support beyond what Flare replacement code currently needs. We can later revisit it with a better understanding of the eager/lazy tradeoff but for now let's remove the inconsistency.
Copy link
Member

@rickhanlonii rickhanlonii left a comment

LGTM

@gaearon gaearon force-pushed the gaearon:evv branch from 372c544 to 46ee6be Aug 24, 2020
@gaearon gaearon merged commit 848bb24 into facebook:master Aug 24, 2020
32 checks passed
32 checks passed
Facebook CLA Check Contributor License Agreement is valid!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_lint_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_persistent Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_prod Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_prod_www Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_prod_www_variant Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: sizebot_stable Your tests passed on CircleCI!
Details
ci/circleci: yarn_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_flow Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_devtools Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_prod_www Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_prod_www_variant Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_www Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_www_variant Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
facebook-github-bot added a commit to facebook/react-native that referenced this pull request Oct 27, 2020
Summary:
This sync includes the following changes:
- **[eaaf4cbce](facebook/react@eaaf4cb )**: 17.0.1 //<Dan Abramov>//
- **[6f62abb58](facebook/react@6f62abb )**: Remove usage of Array#fill ([#20071](facebook/react#20071)) //<Dan Abramov>//
- **[40cfe1f48](facebook/react@40cfe1f )**: Update CHANGELOG.md //<Dan Abramov>//
- **[f021a983a](facebook/react@f021a98 )**: Bump versions for 17 ([#20062](facebook/react#20062)) //<Dan Abramov>//
- **[d1bb4d851](facebook/react@d1bb4d8 )**: Profiler: Include ref callbacks in onCommit duration ([#20060](facebook/react#20060)) //<Brian Vaughn>//
- **[c59c3dfe5](facebook/react@c59c3df )**: useRef: Warn about reading or writing mutable values during render ([#18545](facebook/react#18545)) //<Brian Vaughn>//
- **[7b6cac952](facebook/react@7b6cac9 )**: Improved Profiler commit hooks test ([#20053](facebook/react#20053)) //<Brian Vaughn>//
- **[dfb6a4033](facebook/react@dfb6a40 )**: [Fast Refresh] Fix crashes caused by rogue Proxies ([#20030](facebook/react#20030)) ([#20039](facebook/react#20039)) //<Kai Riemann>//
- **[37cb732c5](facebook/react@37cb732 )**: Use bitwise OR to define flag masks ([#20044](facebook/react#20044)) //<Andrew Clark>//
- **[eb3181e77](facebook/react@eb3181e )**: Add Visibility flag for hiding/unhiding trees ([#20043](facebook/react#20043)) //<Andrew Clark>//
- **[0dd809bdf](facebook/react@0dd809b )**: Remove last schedulePassiveEffectCallback call ([#20042](facebook/react#20042)) //<Andrew Clark>//
- **[8df7b7911](facebook/react@8df7b79 )**: Remove Passive flag from "before mutation" phase ([#20038](facebook/react#20038)) //<Andrew Clark>//
- **[c57fe4a2c](facebook/react@c57fe4a )**: ReactIs.isValidElementType Unit Test extended with PureComponent case ([#20033](facebook/react#20033)) //<adasq>//
- **[02da938fd](facebook/react@02da938 )**: Don't double-invoke effects in legacy roots ([#20028](facebook/react#20028)) //<Brian Vaughn>//
- **[d95c4938d](facebook/react@d95c493 )**: [EventSystem] Revise onBeforeBlur propagation mechanics ([#20020](facebook/react#20020)) //<Dominic Gannaway>//
- **[f46a80ae1](facebook/react@f46a80a )**: Update outdated links and fix two broken links  ([#19985](facebook/react#19985)) //<Saikat Guha>//
- **[0a4c7c565](facebook/react@0a4c7c5 )**: [Flight] Don't warn for key, but error for ref ([#19986](facebook/react#19986)) //<Sebastian Markbåge>//
- **[993ca533b](facebook/react@993ca53 )**: Enable eager listeners statically ([#19983](facebook/react#19983)) //<Dan Abramov>//
- **[40c52de96](facebook/react@40c52de )**: [Flight] Add Runtime Errors for Non-serializable Values ([#19980](facebook/react#19980)) //<Sebastian Markbåge>//
- **[1992d9730](facebook/react@1992d97 )**: Revert "Temporarily disable Profiler commit hooks flag ([#19900](facebook/react#19900))" ([#19960](facebook/react#19960)) //<Brian Vaughn>//
- **[44d39c4d7](facebook/react@44d39c4 )**: Removed skip-error-boundaries modifications from old fork ([#19961](facebook/react#19961)) //<Brian Vaughn>//
- **[cc77be957](facebook/react@cc77be9 )**: Remove unnecessary error overriding in ([#19949](facebook/react#19949)) //<Paul Doyle>//
- **[97625272a](facebook/react@9762527 )**: Debug tracing tests for CPU bound suspense ([#19943](facebook/react#19943)) //<Brian Vaughn>//
- **[43363e279](facebook/react@43363e2 )**: Fix codestyle for typeof comparison ([#19928](facebook/react#19928)) //<Eugene Maslovich>//
- **[5427b4657](facebook/react@5427b46 )**: Temporarily disable Profiler commit hooks flag ([#19900](facebook/react#19900)) //<Brian Vaughn>//
- **[1faf9e3dd](facebook/react@1faf9e3 )**: Suspense for CPU-bound trees ([#19936](facebook/react#19936)) //<Andrew Clark>//
- **[7f08e908b](facebook/react@7f08e90 )**: Fix missing context to componentDidMount() when double-invoking lifecycles ([#19935](facebook/react#19935)) //<Brian Vaughn>//
- **[9198a5cec](facebook/react@9198a5c )**: Refactor layout effect methods ([#19895](facebook/react#19895)) //<Brian Vaughn>//
- **[ba82eea38](facebook/react@ba82eea )**: Remove disableSchedulerTimeoutInWorkLoop flag ([#19902](facebook/react#19902)) //<Andrew Clark>//
- **[c63741fb3](facebook/react@c63741f )**: offscreen double invoke effects ([#19523](facebook/react#19523)) //<Luna Ruan>//
- **[c6917346f](facebook/react@c691734 )**: Fixed broken Profiler test ([#19894](facebook/react#19894)) //<Brian Vaughn>//
- **[87c023b1c](facebook/react@87c023b )**: Profiler onRender only called when we do work ([#19885](facebook/react#19885)) //<Brian Vaughn>//
- **[81aaee56a](facebook/react@81aaee5 )**: Don't call onCommit et al if there are no effects ([#19863](facebook/react#19863)) //<Andrew Clark>//
- **[7355bf575](facebook/react@7355bf5 )**: Consolidate commit phase hook functions ([#19864](facebook/react#19864)) //<Andrew Clark>//
- **[bc6b7b6b1](facebook/react@bc6b7b6 )**: Don't trigger lazy in DEV during element creation ([#19871](facebook/react#19871)) //<Dan Abramov>//
- **[a774502e0](facebook/react@a774502 )**: Use single quotes in getComponentName return ([#19873](facebook/react#19873)) //<Gustavo Saiani>//
- **[8b2d3783e](facebook/react@8b2d378 )**: Use Passive flag to schedule onPostCommit ([#19862](facebook/react#19862)) //<Andrew Clark>//
- **[50d9451f3](facebook/react@50d9451 )**: Improve DevTools editing interface ([#19774](facebook/react#19774)) //<Brian Vaughn>//
- **[6fddca27e](facebook/react@6fddca2 )**: Remove passive intervention flag ([#19849](facebook/react#19849)) //<Dan Abramov>//
- **[36df9185c](facebook/react@36df918 )**: chore(docs): Removed outdated comment about fb.me link  ([#19830](facebook/react#19830)) //<Adnaan Bheda>//
- **[16fb2b6f9](facebook/react@16fb2b6 )**: Moved resetChildLanes into complete work ([#19836](facebook/react#19836)) //<Brian Vaughn>//
- **[cc581065d](facebook/react@cc58106 )**: eslint-plugin-react-hooks@4.1.2 //<Dan Abramov>//
- **[0044805c8](facebook/react@0044805 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[0f70d4dd6](facebook/react@0f70d4d )**: Consider components in jsx as missing dependencies in typescript-eslint/parser@4.x ([#19815](facebook/react#19815)) //<Sebastian Silbermann>//
- **[84558c61b](facebook/react@84558c6 )**: Don't visit passive effects during layout phase ([#19809](facebook/react#19809)) //<Andrew Clark>//
- **[ad8a0a8cd](facebook/react@ad8a0a8 )**: eslint-plugin-react-hooks@4.1.1 //<Dan Abramov>//
- **[77544a0d6](facebook/react@77544a0 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[ed4fdfc73](facebook/react@ed4fdfc )**: test(eslint-plugin-react-hooks): Run with TS parsers >= 2.x ([#19792](facebook/react#19792)) //<Sebastian Silbermann>//
- **[cd75f93c0](facebook/react@cd75f93 )**: eslint-plugin-react-hooks: fix compatibility with typescript-eslint/parser@4.0.0+ ([#19751](facebook/react#19751)) //<Matthias Schiffer>//
- **[781212aab](facebook/react@781212a )**: Remove double space in test name ([#19762](facebook/react#19762)) //<Gustavo Saiani>//
- **[e7b255341](facebook/react@e7b2553 )**: Internal `act`: Flush timers at end of scope ([#19788](facebook/react#19788)) //<Andrew Clark>//
- **[d17086c7c](facebook/react@d17086c )**: Decouple public, internal act implementation ([#19745](facebook/react#19745)) //<Andrew Clark>//
- **[d38ec17b1](facebook/react@d38ec17 )**: [Flight] Set dispatcher for duration of performWork() ([#19776](facebook/react#19776)) //<Joseph Savona>//
- **[4f3f7eeb7](facebook/react@4f3f7ee )**: Bugfix: Effect clean up when deleting suspended tree ([#19752](facebook/react#19752)) //<Andrew Clark>//
- **[7baf9d412](facebook/react@7baf9d4 )**: Combine Flags and SubtreeFlags types ([#19775](facebook/react#19775)) //<Andrew Clark>//
- **[166544360](facebook/react@1665443 )**: Rename effect fields ([#19755](facebook/react#19755)) //<Andrew Clark>//
- **[708fa77a7](facebook/react@708fa77 )**: Decrease expiration time of input updates ([#19772](facebook/react#19772)) //<Andrew Clark>//
- **[36df483af](facebook/react@36df483 )**: Add feature flag to disable scheduler timeout in work loop ([#19771](facebook/react#19771)) //<Ricky>//
- **[bcc0aa463](facebook/react@bcc0aa4 )**: Revert "Revert "Remove onScroll bubbling flag ([#19535](facebook/react#19535))" ([#19655](facebook/react#19655))" ([#19761](facebook/react#19761)) //<Dan Abramov>//
- **[99cae887f](facebook/react@99cae88 )**: Add failing test for passive effect cleanup functions and memoized components ([#19750](facebook/react#19750)) //<Brian Vaughn>//
- **[2cfd73c4d](facebook/react@2cfd73c )**: Fix typo in comment (Noticable→Noticeable) ([#19737](facebook/react#19737)) //<Ikko Ashimine>//
- **[53e622ca7](facebook/react@53e622c )**: Fix instances of function declaration after return ([#19733](facebook/react#19733)) //<Bhumij Gupta>//
- **[b7d18c4da](facebook/react@b7d18c4 )**: Support Babel's envName option in React Refresh plugin ([#19009](facebook/react#19009)) //<Kevin Weber>//
- **[1f38dcff6](facebook/react@1f38dcf )**: Remove withSuspenseConfig ([#19724](facebook/react#19724)) //<Andrew Clark>//
- **[1396e4a8f](facebook/react@1396e4a )**: Fixes eslint warning when node type is ChainExpression ([#19680](facebook/react#19680)) //<Pascal Fong Kye>//
- **[a8500be89](facebook/react@a8500be )**: Add `startTransition` as a known stable method ([#19720](facebook/react#19720)) //<Andrew Clark>//
- **[380dc95de](facebook/react@380dc95 )**: Revert "Append text string to <Text> error message ([#19581](facebook/react#19581))" ([#19723](facebook/react#19723)) //<Timothy Yung>//
- **[ddd1faa19](facebook/react@ddd1faa )**: Remove config argument from useTransition ([#19719](facebook/react#19719)) //<Andrew Clark>//
- **[92fcd46cc](facebook/react@92fcd46 )**: Replace SuspenseConfig object with an integer ([#19706](facebook/react#19706)) //<Andrew Clark>//
- **[b754caaaf](facebook/react@b754caa )**: Enable eager listeners in open source ([#19716](facebook/react#19716)) //<Dan Abramov>//
- **[c1ac05215](facebook/react@c1ac052 )**: [Flight] Support more element types and Hooks for Server and Hybrid Components ([#19711](facebook/react#19711)) //<Dan Abramov>//
- **[1eaafc9ad](facebook/react@1eaafc9 )**: Clean up timeoutMs-related implementation details ([#19704](facebook/react#19704)) //<Andrew Clark>//
- **[8da0da093](facebook/react@8da0da0 )**: Disable timeoutMs argument ([#19703](facebook/react#19703)) //<Andrew Clark>//
- **[60ba723bf](facebook/react@60ba723 )**: Add SuspenseList to devTools ([#19684](facebook/react#19684)) //<Ben Pernick>//
- **[5564f2c95](facebook/react@5564f2c )**: Add React.startTransition ([#19696](facebook/react#19696)) //<Ricky>//
- **[c4e0768d7](facebook/react@c4e0768 )**: Remove unused argument from `finishConcurrentRender` ([#19689](facebook/react#19689)) //<inottn>//
- **[848bb2426](facebook/react@848bb24 )**: Attach Listeners Eagerly to Roots and Portal Containers ([#19659](facebook/react#19659)) //<Dan Abramov>//
- **[d2e914ab4](facebook/react@d2e914a )**: Remove remaining references to effect list ([#19673](facebook/react#19673)) //<Andrew Clark>//
- **[d6e433899](facebook/react@d6e4338 )**: Use Global Render Timeout for CPU Suspense ([#19643](facebook/react#19643)) //<Sebastian Markbåge>//
- **[64ddef44c](facebook/react@64ddef4 )**: Revert "Remove onScroll bubbling flag ([#19535](facebook/react#19535))" ([#19655](facebook/react#19655)) //<Dan Abramov>//
- **[dd651df05](facebook/react@dd651df )**: Keep onTouchStart, onTouchMove, and onWheel passive ([#19654](facebook/react#19654)) //<Dan Abramov>//
- **[b8fa09e9e](facebook/react@b8fa09e )**: provide profiling bundle for react-reconciler ([#19559](facebook/react#19559)) //<Julien Gilli>//
- **[23595ff59](facebook/react@23595ff )**: Add missing param to safelyCallDestroy() ([#19638](facebook/react#19638)) //<Brian Vaughn>//
- **[ee409ea3b](facebook/react@ee409ea )**: change destroy to safelyCallDestroy ([#19605](facebook/react#19605)) //<Luna Ruan>//
- **[bcca5a6ca](facebook/react@bcca5a6 )**: Always skip unmounted/unmounting error boundaries ([#19627](facebook/react#19627)) //<Brian Vaughn>//
- **[1a41a196b](facebook/react@1a41a19 )**: Append text string to <Text> error message ([#19581](facebook/react#19581)) //<Timothy Yung>//
- **[e4afb2fdd](facebook/react@e4afb2f )**: eslint-plugin-react-hooks@4.1.0 //<Dan Abramov>//
- **[ced05c46c](facebook/react@ced05c4 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[702fad4b1](facebook/react@702fad4 )**: refactor fb.me redirect link to reactjs.org/link ([#19598](facebook/react#19598)) //<CY Lim>//
- **[49cd77d24](facebook/react@49cd77d )**: fix: leak strict mode with UMD builds ([#19614](facebook/react#19614)) //<Toru Kobayashi>//
- **[ffb749c95](facebook/react@ffb749c )**: Improve error boundary handling for unmounted subtrees ([#19542](facebook/react#19542)) //<Brian Vaughn>//
- **[9b35dd2fc](facebook/react@9b35dd2 )**: Permanently removed component stacks from scheduling profiler data ([#19615](facebook/react#19615)) //<Brian Vaughn>//
- **[3f8115cdd](facebook/react@3f8115c )**: Remove `didTimeout` check from work loop //<Andrew Clark>//
- **[9abc2785c](facebook/react@9abc278 )**: Remove wasteful checks from `shouldYield` //<Andrew Clark>//
- **[1d5e10f70](facebook/react@1d5e10f )**: [eslint-plugin-react-hooks] Report constant constructions ([#19590](facebook/react#19590)) //<Jordan Eldredge>//
- **[dab0854c5](facebook/react@dab0854 )**: Move commit passive unmount/mount to CommitWork ([#19599](facebook/react#19599)) //<Sebastian Markbåge>//
- **[ccb6c3945](facebook/react@ccb6c39 )**: Remove unused argument ([#19600](facebook/react#19600)) //<inottn>//
- **[629125555](facebook/react@6291255 )**: [Scheduler] Re-throw unhandled errors ([#19595](facebook/react#19595)) //<Andrew Clark>//
- **[b8ed6a1aa](facebook/react@b8ed6a1 )**: [Scheduler] Call postTask directly ([#19551](facebook/react#19551)) //<Andrew Clark>//
- **[ce37bfad5](facebook/react@ce37bfa )**: Remove resolutions from test renderer package.json ([#19577](facebook/react#19577)) //<Dan Abramov>//
- **[2704bb537](facebook/react@2704bb5 )**: Add ReactVersion to SchedulingProfiler render scheduled marks ([#19553](facebook/react#19553)) //<Kartik Choudhary>//
- **[0c52e24cb](facebook/react@0c52e24 )**: Support inner component _debugOwner in memo ([#19556](facebook/react#19556)) //<Brian Vaughn>//
- **[0cd9a6de5](facebook/react@0cd9a6d )**: Parallelize Jest in CI ([#19552](facebook/react#19552)) //<Andrew Clark>//
- **[a63893ff3](facebook/react@a63893f )**: Warn about undefined return value for memo and forwardRef ([#19550](facebook/react#19550)) //<Brian Vaughn>//
- **[32ff42868](facebook/react@32ff428 )**: Add feature flag for setting update lane priority ([#19401](facebook/react#19401)) //<Ricky>//
- **[5bdd4c8c6](facebook/react@5bdd4c8 )**: Remove unused argument from call to jest method ([#19546](facebook/react#19546)) //<Gustavo Saiani>//
- **[a5fed98a9](facebook/react@a5fed98 )**: Register more node types that are used later as JSXIdentifiers ([#19514](facebook/react#19514)) //<Mateusz Burzyński>//
- **[f77c7b9d7](facebook/react@f77c7b9 )**: Re-add discrete flushing timeStamp heuristic (behind flag) ([#19540](facebook/react#19540)) //<Dominic Gannaway>//

Changelog: [general] [feature] Upgrade to React 17

Reviewed By: cpojer

Differential Revision: D24491201

fbshipit-source-id: c947da9dcccbd614e9dc58f3339b63e24829aca7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.