mirror of
https://github.com/facebook/react.git
synced 2026-02-26 07:55:55 +00:00
We'll use this in www to test whether the polyfill is better at scheduling high-pri async work than the native one. My preliminary tests suggest "yes" but it's hard to say for certain, given how difficult it is to consistently reproduce the starvation issues we've been seeing.
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
import invariant from 'fbjs/lib/invariant';
|
|
|
|
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
|
|
import typeof * as PersistentFeatureFlagsType from './ReactFeatureFlags.persistent';
|
|
|
|
export const debugRenderPhaseSideEffects = false;
|
|
export const debugRenderPhaseSideEffectsForStrictMode = false;
|
|
export const enableCreateRoot = false;
|
|
export const enableUserTimingAPI = __DEV__;
|
|
export const enableGetDerivedStateFromCatch = false;
|
|
export const warnAboutDeprecatedLifecycles = false;
|
|
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
|
|
|
|
// react-reconciler/persistent entry point
|
|
// uses a persistent reconciler.
|
|
export const enableMutatingReconciler = false;
|
|
export const enableNoopReconciler = false;
|
|
export const enablePersistentReconciler = true;
|
|
export const alwaysUseRequestIdleCallbackPolyfill = false;
|
|
|
|
// Only used in www builds.
|
|
export function addUserTimingListener() {
|
|
invariant(false, 'Not implemented.');
|
|
}
|
|
|
|
// Flow magic to verify the exports of this file match the original version.
|
|
// eslint-disable-next-line no-unused-vars
|
|
type Check<_X, Y: _X, X: Y = _X> = null;
|
|
// eslint-disable-next-line no-unused-expressions
|
|
(null: Check<PersistentFeatureFlagsType, FeatureFlagsType>);
|