printReactiveScopeSummary() — react Function Reference
Architecture documentation for the printReactiveScopeSummary() function in PrintReactiveFunction.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 1bdc8334_3c1c_83a7_7240_5b79cb3fe720["printReactiveScopeSummary()"] 59e1e986_38f8_5b9e_6dde_6da449e7daa0["PrintReactiveFunction.ts"] 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 -->|defined in| 59e1e986_38f8_5b9e_6dde_6da449e7daa0 737852de_8c5a_a757_8ad7_25a6f6567f10["printTerminal()"] 737852de_8c5a_a757_8ad7_25a6f6567f10 -->|calls| 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 ada7f003_8ba3_20e8_138d_24e6f090b98d["visitBlock()"] ada7f003_8ba3_20e8_138d_24e6f090b98d -->|calls| 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 54c67c7b_9ce7_c344_386c_6a7ce22ab546["canMergeScopes()"] 54c67c7b_9ce7_c344_386c_6a7ce22ab546 -->|calls| 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 71a68334_4874_6543_a29a_9c06764539a5["writeReactiveBlock()"] 71a68334_4874_6543_a29a_9c06764539a5 -->|calls| 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 327601c5_b6ab_3bdc_db88_89d0b69edd68["writePrunedScope()"] 327601c5_b6ab_3bdc_db88_89d0b69edd68 -->|calls| 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 5f694d00_db22_ca76_929e_f1ed21313ce8["push()"] 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 -->|calls| 5f694d00_db22_ca76_929e_f1ed21313ce8 d3cbc175_3976_cf3c_5adb_57077d982bb1["printDependency()"] 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 -->|calls| d3cbc175_3976_cf3c_5adb_57077d982bb1 984d0816_84f3_589a_982c_1d0486918cde["printIdentifier()"] 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 -->|calls| 984d0816_84f3_589a_982c_1d0486918cde style 1bdc8334_3c1c_83a7_7240_5b79cb3fe720 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts lines 62–93
export function printReactiveScopeSummary(scope: ReactiveScope): string {
const items = [];
// If the scope has a return value it needs a label
items.push('scope');
items.push(`@${scope.id}`);
items.push(`[${scope.range.start}:${scope.range.end}]`);
items.push(
`dependencies=[${Array.from(scope.dependencies)
.map(dep => printDependency(dep))
.join(', ')}]`,
);
items.push(
`declarations=[${Array.from(scope.declarations)
.map(([, decl]) =>
printIdentifier({...decl.identifier, scope: decl.scope}),
)
.join(', ')}]`,
);
items.push(
`reassignments=[${Array.from(scope.reassignments).map(reassign =>
printIdentifier(reassign),
)}]`,
);
if (scope.earlyReturnValue !== null) {
items.push(
`earlyReturn={id: ${printIdentifier(
scope.earlyReturnValue.value,
)}, label: ${scope.earlyReturnValue.label}}}`,
);
}
return items.join(' ');
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does printReactiveScopeSummary() do?
printReactiveScopeSummary() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts.
Where is printReactiveScopeSummary() defined?
printReactiveScopeSummary() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts at line 62.
What does printReactiveScopeSummary() call?
printReactiveScopeSummary() calls 3 function(s): printDependency, printIdentifier, push.
What calls printReactiveScopeSummary()?
printReactiveScopeSummary() is called by 5 function(s): canMergeScopes, printTerminal, visitBlock, writePrunedScope, writeReactiveBlock.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free