markUsed() — react Function Reference
Architecture documentation for the markUsed() function in code-path-segment.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 0fb6e129_9f7c_9df0_9e75_b9fd2992f912["markUsed()"] 94915e97_e9c3_c422_6269_4bbf858b3cf3["CodePathSegment"] 0fb6e129_9f7c_9df0_9e75_b9fd2992f912 -->|defined in| 94915e97_e9c3_c422_6269_4bbf858b3cf3 6c672222_212c_f636_461c_cc6d37bc9347["newUnreachable()"] 6c672222_212c_f636_461c_cc6d37bc9347 -->|calls| 0fb6e129_9f7c_9df0_9e75_b9fd2992f912 style 0fb6e129_9f7c_9df0_9e75_b9fd2992f912 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-segment.js lines 156–176
static markUsed(segment) {
if (segment.internal.used) {
return;
}
segment.internal.used = true;
let i;
if (segment.reachable) {
for (i = 0; i < segment.allPrevSegments.length; ++i) {
const prevSegment = segment.allPrevSegments[i];
prevSegment.allNextSegments.push(segment);
prevSegment.nextSegments.push(segment);
}
} else {
for (i = 0; i < segment.allPrevSegments.length; ++i) {
segment.allPrevSegments[i].allNextSegments.push(segment);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does markUsed() do?
markUsed() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-segment.js.
Where is markUsed() defined?
markUsed() is defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-segment.js at line 156.
What calls markUsed()?
markUsed() is called by 1 function(s): newUnreachable.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free