codegenObjectPropertyKey() — react Function Reference
Architecture documentation for the codegenObjectPropertyKey() function in CodegenReactiveFunction.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD a11bc4aa_cf2e_833d_d17b_0c1eefd2a759["codegenObjectPropertyKey()"] dc7f10c2_c914_a162_d02b_a10a15c64a5f["CodegenReactiveFunction.ts"] a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 -->|defined in| dc7f10c2_c914_a162_d02b_a10a15c64a5f d8edf87e_ea78_c9d0_b5c9_13d68891efec["codegenInstructionValue()"] d8edf87e_ea78_c9d0_b5c9_13d68891efec -->|calls| a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 fa00221c_3f87_f634_2655_5b0ca5860306["codegenLValue()"] fa00221c_3f87_f634_2655_5b0ca5860306 -->|calls| a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 417e2d5f_b23d_4958_62ad_83267727fc72["codegenPlace()"] a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 -->|calls| 417e2d5f_b23d_4958_62ad_83267727fc72 041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"] a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e style a11bc4aa_cf2e_833d_d17b_0c1eefd2a759 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts lines 2476–2499
function codegenObjectPropertyKey(
cx: Context,
key: ObjectPropertyKey,
): t.Expression {
switch (key.kind) {
case 'string': {
return t.stringLiteral(key.name);
}
case 'identifier': {
return t.identifier(key.name);
}
case 'computed': {
const expr = codegenPlace(cx, key.name);
CompilerError.invariant(t.isExpression(expr), {
reason: 'Expected object property key to be an expression',
loc: key.name.loc,
});
return expr;
}
case 'number': {
return t.numericLiteral(key.name);
}
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does codegenObjectPropertyKey() do?
codegenObjectPropertyKey() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts.
Where is codegenObjectPropertyKey() defined?
codegenObjectPropertyKey() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts at line 2476.
What does codegenObjectPropertyKey() call?
codegenObjectPropertyKey() calls 2 function(s): codegenPlace, invariant.
What calls codegenObjectPropertyKey()?
codegenObjectPropertyKey() is called by 2 function(s): codegenInstructionValue, codegenLValue.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free