createTagProperty() — react Function Reference
Architecture documentation for the createTagProperty() function in InlineJsxTransform.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD d9106868_6d03_1ff1_205c_dab111a9cb82["createTagProperty()"] 5e75c578_acd8_79e6_2aae_0bb0b2c9ce77["InlineJsxTransform.ts"] d9106868_6d03_1ff1_205c_dab111a9cb82 -->|defined in| 5e75c578_acd8_79e6_2aae_0bb0b2c9ce77 876d58c8_bfce_a9d8_22c0_b40cc7e22553["inlineJsxTransform()"] 876d58c8_bfce_a9d8_22c0_b40cc7e22553 -->|calls| d9106868_6d03_1ff1_205c_dab111a9cb82 49446ae1_b830_9411_8258_1139d21b314b["createTemporaryPlace()"] d9106868_6d03_1ff1_205c_dab111a9cb82 -->|calls| 49446ae1_b830_9411_8258_1139d21b314b 53244187_914c_cc90_5880_7bfc1fc9c0bb["push()"] d9106868_6d03_1ff1_205c_dab111a9cb82 -->|calls| 53244187_914c_cc90_5880_7bfc1fc9c0bb style d9106868_6d03_1ff1_205c_dab111a9cb82 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Optimization/InlineJsxTransform.ts lines 504–546
function createTagProperty(
fn: HIRFunction,
instr: Instruction,
nextInstructions: Array<Instruction>,
componentTag: BuiltinTag | Place,
): ObjectProperty {
let tagProperty: ObjectProperty;
switch (componentTag.kind) {
case 'BuiltinTag': {
const tagPropertyPlace = createTemporaryPlace(fn.env, instr.value.loc);
const tagInstruction: Instruction = {
id: makeInstructionId(0),
lvalue: {...tagPropertyPlace, effect: Effect.Mutate},
value: {
kind: 'Primitive',
value: componentTag.name,
loc: instr.value.loc,
},
effects: null,
loc: instr.loc,
};
tagProperty = {
kind: 'ObjectProperty',
key: {name: 'type', kind: 'string'},
type: 'property',
place: {...tagPropertyPlace, effect: Effect.Capture},
};
nextInstructions.push(tagInstruction);
break;
}
case 'Identifier': {
tagProperty = {
kind: 'ObjectProperty',
key: {name: 'type', kind: 'string'},
type: 'property',
place: {...componentTag, effect: Effect.Capture},
};
break;
}
}
return tagProperty;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does createTagProperty() do?
createTagProperty() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/InlineJsxTransform.ts.
Where is createTagProperty() defined?
createTagProperty() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/InlineJsxTransform.ts at line 504.
What does createTagProperty() call?
createTagProperty() calls 2 function(s): createTemporaryPlace, push.
What calls createTagProperty()?
createTagProperty() is called by 1 function(s): inlineJsxTransform.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free