* @param {object} component * @param {?object} props
(component, props)
| 6410 | * @param {?object} props |
| 6411 | */ |
| 6412 | function assertValidProps(component, props) { |
| 6413 | if (!props) { |
| 6414 | return; |
| 6415 | } |
| 6416 | // Note the use of `==` which checks for null or undefined. |
| 6417 | if ("development" !== 'production') { |
| 6418 | if (voidElementTags[component._tag]) { |
| 6419 | "development" !== 'production' ? warning(props.children == null && props.dangerouslySetInnerHTML == null, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : undefined; |
| 6420 | } |
| 6421 | } |
| 6422 | if (props.dangerouslySetInnerHTML != null) { |
| 6423 | !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : undefined; |
| 6424 | !(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML) ? "development" !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : undefined; |
| 6425 | } |
| 6426 | if ("development" !== 'production') { |
| 6427 | "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : undefined; |
| 6428 | "development" !== 'production' ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : undefined; |
| 6429 | } |
| 6430 | !(props.style == null || typeof props.style === 'object') ? "development" !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : undefined; |
| 6431 | } |
| 6432 | |
| 6433 | function enqueuePutListener(id, registrationName, listener, transaction) { |
| 6434 | if ("development" !== 'production') { |
no test coverage detected