react/packages/react-dom/src/events
Brian Vaughn ffb749c95e
Improve error boundary handling for unmounted subtrees (#19542)
A passive effect's cleanup function may throw after an unmount. Prior to this commit, such an error would be ignored. (React would not notify any error boundaries.) After this commit, React's behavior varies depending on which reconciler fork is being used.

For the old reconciler, React will call componentDidCatch for the nearest unmounted error boundary (if there is one). If there are no unmounted error boundaries, React will still swallow the error because the return pointer has been disconnected, so the normal error handling logic does not know how to traverse the tree to find the nearest still-mounted ancestor.

For the new reconciler, React will skip any unmounted boundaries and look for a still-mounted boundary. If one is found, it will call getDerivedStateFromError and/or componentDidCatch (depending on the type of boundary).

Tests have been added for both reconciler variants for now.
2020-08-14 16:46:46 -04:00
..
__tests__ Improve error boundary handling for unmounted subtrees (#19542) 2020-08-14 16:46:46 -04:00
forks Don't use EventListener Fork in Modern WWW Builds (#18333) 2020-03-18 13:13:50 +00:00
plugins Fix double-firing mouseenter (#19571) 2020-08-10 15:08:22 +01:00
DOMEventNames.js Remove event constants (#19276) 2020-07-30 21:52:37 +01:00
DOMEventProperties.js fix(react-dom): unnecesary path on DOMEventProperties (#19544) 2020-08-06 16:37:06 +01:00
DOMPluginEventSystem.js fix: onFocus/onBlur/onBeforeInput have a matching event type (#19561) 2020-08-10 12:54:10 +01:00
EventListener.js Don't use EventListener Fork in Modern WWW Builds (#18333) 2020-03-18 13:13:50 +00:00
EventRegistry.js Remove event constants (#19276) 2020-07-30 21:52:37 +01:00
EventSystemFlags.js Remove the deprecated React Flare event system (#19520) 2020-08-05 15:13:29 +01:00
FallbackCompositionState.js Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
PluginModuleType.js Extract some of the tidy up changes from 19278 (#19315) 2020-07-10 22:33:42 +01:00
ReactDOMControlledComponent.js React Event System: cleanup plugins + break out update batching logic (#18503) 2020-04-06 22:01:20 +01:00
ReactDOMEventListener.js Add feature flag for setting update lane priority (#19401) 2020-08-06 12:47:32 -04:00
ReactDOMEventReplaying.js Remove the deprecated React Flare event system (#19520) 2020-08-05 15:13:29 +01:00
ReactDOMUpdateBatching.js Re-add discrete flushing timeStamp heuristic (behind flag) (#19540) 2020-08-06 13:21:05 +01:00
ReactSyntheticEventType.js fix: onFocus/onBlur/onBeforeInput have a matching event type (#19561) 2020-08-10 12:54:10 +01:00
SyntheticEvent.js fix event.relatedTarget fallback logic for firefox (#19607) 2020-08-14 13:05:53 +01:00
TopLevelEventTypes.js Remove event constants (#19276) 2020-07-30 21:52:37 +01:00
checkPassiveEvents.js Remove the deprecated React Flare event system (#19520) 2020-08-05 15:13:29 +01:00
getEventCharCode.js Add some type detection (#19239) 2020-07-02 15:54:36 +01:00
getEventTarget.js Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
getListener.js Split cross-package types from implementation 2020-04-08 23:49:23 -07:00
getVendorPrefixedEventName.js Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
isEventSupported.js Fix Flow from #19239 (#19242) 2020-07-02 16:37:10 +01:00
isTextInputElement.js Move some files out of /shared and rename to upper case (#18363) 2020-03-21 15:22:01 -07:00