@samitouri / QOS-React-2 / commits / 7aa35ceae0

Fix casing of shouldflushDiscreteUpdates

shouldflushDiscreteUpdates -> shouldFlushDiscreteUpdates

Andrew Clark committed May 30, 2019 at 14:41 UTC 7aa35ceae0d3a4d846498f128227ffa7c84900f4
2 files changed +4 -4
packages/react-dom/src/events/DOMEventResponderSystem.js
+2 -2
@@ -610,7 +610,7 @@ export function processEventQueue(): void {
610 return;
611 }
612 if (discrete) {
613 - if (shouldflushDiscreteUpdates(currentTimeStamp)) {
613 + if (shouldFlushDiscreteUpdates(currentTimeStamp)) {
614 flushDiscreteUpdates();
615 }
616 discreteUpdates(() => {
@@ -1019,7 +1019,7 @@ export function generateListeningKey(
1019
1020 let lastDiscreteEventTimeStamp = 0;
1021
1022 -export function shouldflushDiscreteUpdates(timeStamp: number): boolean {
1022 +export function shouldFlushDiscreteUpdates(timeStamp: number): boolean {
1023 // event.timeStamp isn't overly reliable due to inconsistencies in
1024 // how different browsers have historically provided the time stamp.
1025 // Some browsers provide high-resolution time stamps for all events,
packages/react-dom/src/events/ReactDOMEventListener.js
+2 -2
@@ -19,7 +19,7 @@ import {
19 import {runExtractedPluginEventsInBatch} from 'events/EventPluginHub';
20 import {
21 dispatchEventForResponderEventSystem,
22 - shouldflushDiscreteUpdates,
22 + shouldFlushDiscreteUpdates,
23 } from '../events/DOMEventResponderSystem';
24 import {isFiberMounted} from 'react-reconciler/reflection';
25 import {HostRoot} from 'shared/ReactWorkTags';
@@ -229,7 +229,7 @@ function trapEventForPluginEventSystem(
229 }
230
231 function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) {
232 - if (!enableEventAPI || shouldflushDiscreteUpdates(nativeEvent.timeStamp)) {
232 + if (!enableEventAPI || shouldFlushDiscreteUpdates(nativeEvent.timeStamp)) {
233 flushDiscreteUpdates();
234 }
235 discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent);