setProperty() — react Function Reference
Architecture documentation for the setProperty() function in shared-runtime.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 4d7736af_25b8_2724_8550_b2fe6bf1c133["setProperty()"] 9afdd6fb_14c3_0a52_8105_2d82e58c5c28["shared-runtime.ts"] 4d7736af_25b8_2724_8550_b2fe6bf1c133 -->|defined in| 9afdd6fb_14c3_0a52_8105_2d82e58c5c28 style 4d7736af_25b8_2724_8550_b2fe6bf1c133 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/snap/src/sprout/shared-runtime.ts lines 83–99
export function setProperty(arg: any, property: any): void {
// don't mutate primitive
if (arg == null || typeof arg !== 'object') {
return arg;
}
let count: number = 0;
let key;
while (true) {
key = 'wat' + count;
if (!Object.hasOwn(arg, key)) {
arg[key] = property;
return arg;
}
count++;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does setProperty() do?
setProperty() is a function in the react codebase, defined in compiler/packages/snap/src/sprout/shared-runtime.ts.
Where is setProperty() defined?
setProperty() is defined in compiler/packages/snap/src/sprout/shared-runtime.ts at line 83.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free