traverseBlock() — react Function Reference
Architecture documentation for the traverseBlock() function in visitors.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD c6838a07_559a_1310_1c4f_e78266267fb1["traverseBlock()"] 171a5d22_bb6b_1c99_05a4_6ad897438a35["ReactiveFunctionVisitor"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|defined in| 171a5d22_bb6b_1c99_05a4_6ad897438a35 108b8884_5432_e93d_5f46_a6634348d340["visitBlock()"] 108b8884_5432_e93d_5f46_a6634348d340 -->|calls| c6838a07_559a_1310_1c4f_e78266267fb1 a0320514_135c_2cd9_31b2_7e30472da86b["traverseBlock()"] a0320514_135c_2cd9_31b2_7e30472da86b -->|calls| c6838a07_559a_1310_1c4f_e78266267fb1 11690004_c468_3b6b_f07f_36a6501f870a["visitBlock()"] 11690004_c468_3b6b_f07f_36a6501f870a -->|calls| c6838a07_559a_1310_1c4f_e78266267fb1 8c7d9d3d_b681_0556_c6cf_c86359d85bee["visitBlock()"] 8c7d9d3d_b681_0556_c6cf_c86359d85bee -->|calls| c6838a07_559a_1310_1c4f_e78266267fb1 a0d79c92_0677_bb82_4af7_c2bc582087a7["visitPrunedScope()"] a0d79c92_0677_bb82_4af7_c2bc582087a7 -->|calls| c6838a07_559a_1310_1c4f_e78266267fb1 af4d3127_0abf_3e44_50a8_d7a9dd0b9b58["visitInstruction()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| af4d3127_0abf_3e44_50a8_d7a9dd0b9b58 4acb57df_5348_9aab_9691_41cf35127db4["visitScope()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| 4acb57df_5348_9aab_9691_41cf35127db4 6170a433_a27a_7455_6589_a23a789d4771["visitPrunedScope()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| 6170a433_a27a_7455_6589_a23a789d4771 833d0e1b_25d7_480b_1946_284746d6c2bb["visitTerminal()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| 833d0e1b_25d7_480b_1946_284746d6c2bb a0320514_135c_2cd9_31b2_7e30472da86b["traverseBlock()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| a0320514_135c_2cd9_31b2_7e30472da86b d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive()"] c6838a07_559a_1310_1c4f_e78266267fb1 -->|calls| d7fde76c_4fd9_feb3_299b_798689f05bc6 style c6838a07_559a_1310_1c4f_e78266267fb1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts lines 204–231
traverseBlock(block: ReactiveBlock, state: TState): void {
for (const instr of block) {
switch (instr.kind) {
case 'instruction': {
this.visitInstruction(instr.instruction, state);
break;
}
case 'scope': {
this.visitScope(instr, state);
break;
}
case 'pruned-scope': {
this.visitPrunedScope(instr, state);
break;
}
case 'terminal': {
this.visitTerminal(instr, state);
break;
}
default: {
assertExhaustive(
instr,
`Unexpected instruction kind \`${(instr as any).kind}\``,
);
}
}
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does traverseBlock() do?
traverseBlock() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts.
Where is traverseBlock() defined?
traverseBlock() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts at line 204.
What does traverseBlock() call?
traverseBlock() calls 6 function(s): assertExhaustive, traverseBlock, visitInstruction, visitPrunedScope, visitScope, visitTerminal.
What calls traverseBlock()?
traverseBlock() is called by 5 function(s): traverseBlock, visitBlock, visitBlock, visitBlock, visitPrunedScope.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free