-
Notifications
You must be signed in to change notification settings - Fork 49.3k
Description
React version:
19.2.0
Steps To Reproduce
-
Go to
[scheduleUpdateOnFiber](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberWorkLoop.js)
function inreact-reconciler
-
Find this line:
if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot)
-
Notice that
executionContext
is a set of context flags (bitmask), whileNoLanes
refers to lane priorities and is not used in context checks anywhere else
Link to code example
No runtime code needed — this is a logic-level mismatch in the internal source file.
Relevant file:
packages/react-reconciler/src/ReactFiberWorkLoop.js
❌ The current behavior
The line:
(executionContext & RenderContext) !== NoLanes
uses NoLanes
in a bitmask comparison with executionContext
, which is inconsistent with surrounding usages that compare with NoContext
.
NoLanes
is defined in the Lane system and is intended for scheduling lanes, not execution contexts.
✅ The expected behavior
This line should likely be:
(executionContext & RenderContext) !== NoContext
This matches similar checks throughout the codebase and would avoid incorrect context evaluation.