MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / validateProps

Function validateProps

code/composition/public/app.js:14581–14589  ·  view source on GitHub ↗

* Implements an host component that warns when `selected` is set.

(element, props)

Source from the content-addressed store, hash-verified

14579 */
14580
14581function validateProps(element, props) {
14582 // TODO (yungsters): Remove support for `selected` in <option>.
14583 {
14584 if (props.selected != null && !didWarnSelectedSetOnOption) {
14585 warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
14586 didWarnSelectedSetOnOption = true;
14587 }
14588 }
14589}
14590
14591function postMountWrapper$1(element, props) {
14592 // value="" should make a value attribute (#6219)

Callers 2

setInitialProperties$1Function · 0.70
diffHydratedProperties$1Function · 0.70

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected