跳到主要内容

React fiber config with no microtasks

不支持微任务的渲染器可以从此模块重新导出所有内容。

一、作用

二、导出的常量

1. 支持微任务

// Test selectors (when unsupported)
// 测试选择器(当不支持时)
export const supportsMicrotasks = false;

2. 安排微任务

export const scheduleMicrotask = shim;

三、工具

1. 兼容垫片

// Renderers that don't support microtasks
// can re-export everything from this module.
// 不支持微任务的渲染器可以从此模块重新导出所有内容。

function shim(...args: any): empty {
throw new Error(
'The current renderer does not support microtasks. ' +
'This error is likely caused by a bug in React. ' +
'Please file an issue.',
);
}