createOldToNewPropsMapping() — react Function Reference
Architecture documentation for the createOldToNewPropsMapping() function in OutlineJsx.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce["createOldToNewPropsMapping()"] 158befb1_050c_87d2_b4ec_54305bac5a4f["OutlineJsx.ts"] d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce -->|defined in| 158befb1_050c_87d2_b4ec_54305bac5a4f c201bbda_dc3c_7b58_7ce0_7d61d25ef972["emitOutlinedFn()"] c201bbda_dc3c_7b58_7ce0_7d61d25ef972 -->|calls| d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce 49446ae1_b830_9411_8258_1139d21b314b["createTemporaryPlace()"] d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce -->|calls| 49446ae1_b830_9411_8258_1139d21b314b dcb26d23_8970_206b_e5d8_91b588c501b5["makeIdentifierName()"] d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce -->|calls| dcb26d23_8970_206b_e5d8_91b588c501b5 style d6862a21_d6b5_bc01_57d7_ae9d1c1f23ce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Optimization/OutlineJsx.ts lines 467–488
function createOldToNewPropsMapping(
env: Environment,
oldProps: Array<OutlinedJsxAttribute>,
): Map<IdentifierId, OutlinedJsxAttribute> {
const oldToNewProps = new Map();
for (const oldProp of oldProps) {
// Do not read key prop in the outlined component
if (oldProp.originalName === 'key') {
continue;
}
const newProp: OutlinedJsxAttribute = {
...oldProp,
place: createTemporaryPlace(env, GeneratedSource),
};
newProp.place.identifier.name = makeIdentifierName(oldProp.newName);
oldToNewProps.set(oldProp.place.identifier.id, newProp);
}
return oldToNewProps;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does createOldToNewPropsMapping() do?
createOldToNewPropsMapping() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/OutlineJsx.ts.
Where is createOldToNewPropsMapping() defined?
createOldToNewPropsMapping() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/OutlineJsx.ts at line 467.
What does createOldToNewPropsMapping() call?
createOldToNewPropsMapping() calls 2 function(s): createTemporaryPlace, makeIdentifierName.
What calls createOldToNewPropsMapping()?
createOldToNewPropsMapping() is called by 1 function(s): emitOutlinedFn.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free