MCPcopy Index your code
hub / github.com/microsoft/SandDance / resolveDefaultProps

Function resolveDefaultProps

docs/external/js/react-dom.development.js:11978–11995  ·  view source on GitHub ↗
(Component, baseProps)

Source from the content-addressed store, hash-verified

11976 }
11977
11978 function resolveDefaultProps(Component, baseProps) {
11979 if (Component && Component.defaultProps) {
11980 // Resolve default props. Taken from ReactElement
11981 var props = _assign({}, baseProps);
11982
11983 var defaultProps = Component.defaultProps;
11984
11985 for (var propName in defaultProps) {
11986 if (props[propName] === undefined) {
11987 props[propName] = defaultProps[propName];
11988 }
11989 }
11990
11991 return props;
11992 }
11993
11994 return baseProps;
11995 }
11996 function readLazyComponentType(lazyComponent) {
11997 initializeLazyComponentType(lazyComponent);
11998

Callers 5

updateClassInstanceFunction · 0.85
mountLazyComponentFunction · 0.85
beginWorkFunction · 0.85
commitLifeCyclesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected