traverseValue() — react Function Reference
Architecture documentation for the traverseValue() function in visitors.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 4b2dfca2_90c1_e230_94e6_f6d4248bdb52["traverseValue()"] 171a5d22_bb6b_1c99_05a4_6ad897438a35["ReactiveFunctionVisitor"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|defined in| 171a5d22_bb6b_1c99_05a4_6ad897438a35 efd512bc_cd12_5af4_cd24_a098be1037ec["visitValue()"] efd512bc_cd12_5af4_cd24_a098be1037ec -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 2046f7e5_51f5_4e62_fa3f_1036329a3746["traverseValue()"] 2046f7e5_51f5_4e62_fa3f_1036329a3746 -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 59466e3c_8dff_c1c6_a9da_43f2174f7c1b["visitValue()"] 59466e3c_8dff_c1c6_a9da_43f2174f7c1b -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 bd23d26f_7617_08ae_6b8f_87d751ee409d["visitValue()"] bd23d26f_7617_08ae_6b8f_87d751ee409d -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 fef1bf35_8d3b_cf6f_067f_15c57d993e32["visitValue()"] fef1bf35_8d3b_cf6f_067f_15c57d993e32 -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 11bb7b21_44b4_666c_d428_28ac86902860["visitValue()"] 11bb7b21_44b4_666c_d428_28ac86902860 -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 efd512bc_cd12_5af4_cd24_a098be1037ec["visitValue()"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|calls| efd512bc_cd12_5af4_cd24_a098be1037ec af4d3127_0abf_3e44_50a8_d7a9dd0b9b58["visitInstruction()"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|calls| af4d3127_0abf_3e44_50a8_d7a9dd0b9b58 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8["visitPlace()"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|calls| 8d96a57b_ca06_9ec9_edd9_0932b6d3bae8 2046f7e5_51f5_4e62_fa3f_1036329a3746["traverseValue()"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|calls| 2046f7e5_51f5_4e62_fa3f_1036329a3746 b2fc2985_a7ba_9865_c2a3_2a7531f27d44["eachInstructionValueOperand()"] 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 -->|calls| b2fc2985_a7ba_9865_c2a3_2a7531f27d44 style 4b2dfca2_90c1_e230_94e6_f6d4248bdb52 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts lines 52–82
traverseValue(id: InstructionId, value: ReactiveValue, state: TState): void {
switch (value.kind) {
case 'OptionalExpression': {
this.visitValue(id, value.value, state);
break;
}
case 'LogicalExpression': {
this.visitValue(id, value.left, state);
this.visitValue(id, value.right, state);
break;
}
case 'ConditionalExpression': {
this.visitValue(id, value.test, state);
this.visitValue(id, value.consequent, state);
this.visitValue(id, value.alternate, state);
break;
}
case 'SequenceExpression': {
for (const instr of value.instructions) {
this.visitInstruction(instr, state);
}
this.visitValue(value.id, value.value, state);
break;
}
default: {
for (const place of eachInstructionValueOperand(value)) {
this.visitPlace(id, place, state);
}
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does traverseValue() do?
traverseValue() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts.
Where is traverseValue() defined?
traverseValue() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts at line 52.
What does traverseValue() call?
traverseValue() calls 5 function(s): eachInstructionValueOperand, traverseValue, visitInstruction, visitPlace, visitValue.
What calls traverseValue()?
traverseValue() is called by 6 function(s): traverseValue, visitValue, visitValue, visitValue, visitValue, visitValue.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free