Fiber DOM async feature flag (#9127)

D4662171
This commit is contained in:
Ben Alpert 2017-03-06 16:21:43 -08:00 committed by GitHub
parent bb149c8170
commit d79c6ab995
3 changed files with 8 additions and 4 deletions

View File

@ -330,7 +330,7 @@ var DOMRenderer = ReactFiberReconciler({
scheduleDeferredCallback: ReactDOMFrameScheduling.rIC,
useSyncScheduling: true,
useSyncScheduling: !ReactDOMFeatureFlags.fiberAsyncScheduling,
});

View File

@ -12,6 +12,7 @@
'use strict';
var ReactDOMFeatureFlags = {
fiberAsyncScheduling: false,
useCreateElement: true,
useFiber: false,
};

View File

@ -126,9 +126,12 @@ var EventPluginHub = {
// TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
// live here; needs to be moved to a better place soon
if (typeof inst.tag === 'number') {
const props = EventPluginUtils.getFiberCurrentPropsFromNode(
inst.stateNode
);
const stateNode = inst.stateNode;
if (!stateNode) {
// Work in progress (ex: onload events in incremental mode).
return null;
}
const props = EventPluginUtils.getFiberCurrentPropsFromNode(stateNode);
if (!props) {
// Work in progress.
return null;