react/packages/shared/forks/Scheduler.umd.js
Andrew Clark 8c67bbf183
[scheduler] Deadline object -> shouldYield (#14025)
* [scheduler] Deadline object -> shouldYield

Instead of using a requestIdleCallback-style deadline object, expose a
method Scheduler.shouldYield that returns true if there's a higher
priority event in the queue.

* Nits
2018-10-30 13:47:51 -07:00

27 lines
555 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
const {
unstable_cancelCallback,
unstable_now,
unstable_scheduleCallback,
unstable_shouldYield,
} = ReactInternals.Scheduler;
export {
unstable_cancelCallback,
unstable_now,
unstable_scheduleCallback,
unstable_shouldYield,
};