resolveForwardRefForHotReloading() — react Function Reference
Architecture documentation for the resolveForwardRefForHotReloading() function in ReactFiberHotReloading.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a1c5d1f1_a57a_2081_7c6a_c93195ed2162["resolveForwardRefForHotReloading()"] da68ece0_17b1_3c98_d393_5c830eacd9b2["ReactFiberHotReloading.js"] a1c5d1f1_a57a_2081_7c6a_c93195ed2162 -->|defined in| da68ece0_17b1_3c98_d393_5c830eacd9b2 53f55fda_e2b6_2801_4fbc_525f8828d23d["updateHostRoot()"] 53f55fda_e2b6_2801_4fbc_525f8828d23d -->|calls| a1c5d1f1_a57a_2081_7c6a_c93195ed2162 54379e26_51e2_5baf_65fd_04a04dbf0118["resolveFunctionForHotReloading()"] a1c5d1f1_a57a_2081_7c6a_c93195ed2162 -->|calls| 54379e26_51e2_5baf_65fd_04a04dbf0118 style a1c5d1f1_a57a_2081_7c6a_c93195ed2162 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberHotReloading.js lines 86–122
export function resolveForwardRefForHotReloading(type: any): any {
if (__DEV__) {
if (resolveFamily === null) {
// Hot reloading is disabled.
return type;
}
const family = resolveFamily(type);
if (family === undefined) {
// Check if we're dealing with a real forwardRef. Don't want to crash early.
if (
type !== null &&
type !== undefined &&
typeof type.render === 'function'
) {
// ForwardRef is special because its resolved .type is an object,
// but it's possible that we only have its inner render function in the map.
// If that inner render function is different, we'll build a new forwardRef type.
const currentRender = resolveFunctionForHotReloading(type.render);
if (type.render !== currentRender) {
const syntheticType = {
$$typeof: REACT_FORWARD_REF_TYPE,
render: currentRender,
};
if (type.displayName !== undefined) {
(syntheticType: any).displayName = type.displayName;
}
return syntheticType;
}
}
return type;
}
// Use the latest known implementation.
return family.current;
} else {
return type;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does resolveForwardRefForHotReloading() do?
resolveForwardRefForHotReloading() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberHotReloading.js.
Where is resolveForwardRefForHotReloading() defined?
resolveForwardRefForHotReloading() is defined in packages/react-reconciler/src/ReactFiberHotReloading.js at line 86.
What does resolveForwardRefForHotReloading() call?
resolveForwardRefForHotReloading() calls 1 function(s): resolveFunctionForHotReloading.
What calls resolveForwardRefForHotReloading()?
resolveForwardRefForHotReloading() is called by 1 function(s): updateHostRoot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free