{"record":{"id":"69c9618cd7992dc8","repo":"facebook/react","slug":"386","errorCode":"386","errorMessage":"The current renderer does not support microtasks. This error is likely caused by a bug in React. Please file an issue.","messagePattern":"The current renderer does not support microtasks\\. This error is likely caused by a bug in React\\. Please file an issue\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberConfigWithNoMicrotasks.js","lineNumber":14,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Renderers that don't support microtasks\n// can re-export everything from this module.\n\nfunction shim(...args: any): empty {\n  throw new Error(\n    'The current renderer does not support microtasks. ' +\n      'This error is likely caused by a bug in React. ' +\n      'Please file an issue.',\n  );\n}\n\n// Test selectors (when unsupported)\nexport const supportsMicrotasks = false;\nexport const scheduleMicrotask = shim;\n","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberConfigWithNoMicrotasks.js#L1-L24","documentation":"Renderers that cannot schedule microtasks re-export ReactFiberConfigWithNoMicrotasks, where scheduleMicrotask is a throwing shim and `supportsMicrotasks = false`. The reconciler uses scheduleMicrotask for microtask-scheduled work (e.g. sync retry lanes / Suspense retries); if a code path calls it without checking supportsMicrotasks, this invariant fires.","triggerScenarios":"A custom renderer's host config re-exports NoMicrotasks while the runtime hits a microtask-scheduling path — e.g. Suspense/retry scheduling in an environment where the renderer declined microtask support.","commonSituations":"Custom renderer authors copying a no-microtasks config (targeting environments without Promise/microtasks) while the app uses Suspense or sync-update features that schedule microtasks.","solutions":["Implement scheduleMicrotask in your host config — usually `queueMicrotask` or `Promise.resolve().then(callback)`.","Verify the runtime environment actually supports microtasks before re-exporting the NoMicrotasks config.","If supportsMicrotasks was true and it still threw, file an issue — the reconciler should gate on the flag."],"exampleFix":"// before: hostconfig re-exports the throwing shim\nexport {scheduleMicrotask} from 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks';\n\n// after: implement it\nexport const supportsMicrotasks = true;\nexport function scheduleMicrotask(callback) {\n  Promise.resolve().then(callback);\n}","handlingStrategy":"validation","validationCode":"// Custom renderer config: only claim no-microtasks where none exist\nconst hasMicrotasks = typeof queueMicrotask === 'function' || typeof Promise === 'function';\nexport {scheduleMicrotask} from hasMicrotasks\n  ? './microtasksImpl'\n  : 'react-reconciler/src/ReactFiberConfigWithNoMicrotasks';","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Implement scheduleMicrotask via Promise.resolve().then unless the target truly lacks microtasks","Test suspense/retry paths against your custom host config before shipping","Gate Suspense-heavy features in environments without microtask support"],"tags":["microtasks","custom-renderer","renderer-capability","suspense"],"backgroundTag":"renderer-capability-unsupported","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}