How to use the scheduler.unstable_cancelCallback function in scheduler

To help you get started, we’ve selected a few scheduler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yiminghe / react-fiber-worker / src / worker / react-reconciler / src / ReactFiberScheduler.js View on Github external
function flushPassiveEffects() {
  if (passiveEffectCallback !== null) {
    Schedule_cancelCallback(passiveEffectCallbackHandle);
    // We call the scheduled callback instead of commitPassiveEffects directly
    // to ensure tracing works correctly.
    passiveEffectCallback();
  }
}
github BUPTlhuanyu / ReactNote / react / packages / react-reconciler / src / ReactFiberScheduler.js View on Github external
function flushPassiveEffects() {
  if (passiveEffectCallback !== null) {
    Schedule_cancelCallback(passiveEffectCallbackHandle);
    // We call the scheduled callback instead of commitPassiveEffects directly
    // to ensure tracing works correctly.
    passiveEffectCallback();
  }
}