MCPcopy Create free account
hub / github.com/plotly/dash / resolveDefaultProps

Function resolveDefaultProps

dash/deps/react-dom@18.3.1.js:17801–17817  ·  view source on GitHub ↗
(Component, baseProps)

Source from the content-addressed store, hash-verified

17799 }
17800
17801 function resolveDefaultProps(Component, baseProps) {
17802 if (Component && Component.defaultProps) {
17803 // Resolve default props. Taken from ReactElement
17804 var props = assign({}, baseProps);
17805 var defaultProps = Component.defaultProps;
17806
17807 for (var propName in defaultProps) {
17808 if (props[propName] === undefined) {
17809 props[propName] = defaultProps[propName];
17810 }
17811 }
17812
17813 return props;
17814 }
17815
17816 return baseProps;
17817 }
17818
17819 var fakeInternalInstance = {};
17820 var didWarnAboutStateAssignmentForComponent;

Callers 5

updateClassInstanceFunction · 0.70
mountLazyComponentFunction · 0.70
beginWorkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…