MCPcopy Create free account
hub / github.com/reactjs/react-rails / resolveDefaultProps

Function resolveDefaultProps

lib/assets/react-source/development/react.js:15538–15555  ·  view source on GitHub ↗
(Component, baseProps)

Source from the content-addressed store, hash-verified

15536 }
15537
15538 function resolveDefaultProps(Component, baseProps) {
15539 if (Component && Component.defaultProps) {
15540 // Resolve default props. Taken from ReactElement
15541 var props = _assign({}, baseProps);
15542
15543 var defaultProps = Component.defaultProps;
15544
15545 for (var propName in defaultProps) {
15546 if (props[propName] === undefined) {
15547 props[propName] = defaultProps[propName];
15548 }
15549 }
15550
15551 return props;
15552 }
15553
15554 return baseProps;
15555 }
15556 function readLazyComponentType(lazyComponent) {
15557 initializeLazyComponentType(lazyComponent);
15558

Callers 5

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

Calls

no outgoing calls

Tested by

no test coverage detected