getContextKeys() — react Function Reference
Architecture documentation for the getContextKeys() function in LowerContextAccess.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD d865d73c_e43b_cca8_9f60_c83bc41deeb8["getContextKeys()"] ed770299_f9db_61d4_407c_b8ead52e24ec["LowerContextAccess.ts"] d865d73c_e43b_cca8_9f60_c83bc41deeb8 -->|defined in| ed770299_f9db_61d4_407c_b8ead52e24ec d3225c91_4858_fca4_72c5_c74a4f05f299["lowerContextAccess()"] d3225c91_4858_fca4_72c5_c74a4f05f299 -->|calls| d865d73c_e43b_cca8_9f60_c83bc41deeb8 53244187_914c_cc90_5880_7bfc1fc9c0bb["push()"] d865d73c_e43b_cca8_9f60_c83bc41deeb8 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb style d865d73c_e43b_cca8_9f60_c83bc41deeb8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts lines 153–178
function getContextKeys(value: Destructure): Array<string> | null {
const keys = [];
const pattern = value.lvalue.pattern;
switch (pattern.kind) {
case 'ArrayPattern': {
return null;
}
case 'ObjectPattern': {
for (const place of pattern.properties) {
if (
place.kind !== 'ObjectProperty' ||
place.type !== 'property' ||
place.key.kind !== 'identifier' ||
place.place.identifier.name === null ||
place.place.identifier.name.kind !== 'named'
) {
return null;
}
keys.push(place.key.name);
}
return keys;
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does getContextKeys() do?
getContextKeys() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts.
Where is getContextKeys() defined?
getContextKeys() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts at line 153.
What does getContextKeys() call?
getContextKeys() calls 1 function(s): push.
What calls getContextKeys()?
getContextKeys() is called by 1 function(s): lowerContextAccess.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free