leaveFromCurrentSegment() — react Function Reference
Architecture documentation for the leaveFromCurrentSegment() function in code-path-analyzer.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD fa3487f5_3f61_87df_62c2_fe89baf54f24["leaveFromCurrentSegment()"] 09a1c78a_21af_9be8_1cc6_22cf0ceb9f8f["code-path-analyzer.js"] fa3487f5_3f61_87df_62c2_fe89baf54f24 -->|defined in| 09a1c78a_21af_9be8_1cc6_22cf0ceb9f8f 11e4f269_d571_4dd5_501c_3de51f1f8ba6["postprocess()"] 11e4f269_d571_4dd5_501c_3de51f1f8ba6 -->|calls| fa3487f5_3f61_87df_62c2_fe89baf54f24 style fa3487f5_3f61_87df_62c2_fe89baf54f24 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-analyzer.js lines 227–239
function leaveFromCurrentSegment(analyzer, node) {
const state = CodePath.getState(analyzer.codePath);
const currentSegments = state.currentSegments;
for (let i = 0; i < currentSegments.length; ++i) {
const currentSegment = currentSegments[i];
if (currentSegment.reachable) {
analyzer.emitter.emit('onCodePathSegmentEnd', currentSegment, node);
}
}
state.currentSegments = [];
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does leaveFromCurrentSegment() do?
leaveFromCurrentSegment() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-analyzer.js.
Where is leaveFromCurrentSegment() defined?
leaveFromCurrentSegment() is defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-analyzer.js at line 227.
What calls leaveFromCurrentSegment()?
leaveFromCurrentSegment() is called by 1 function(s): postprocess.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free