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

Function validateProps

code/new-context-api/public/app.js:13804–13812  ·  view source on GitHub ↗

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

(element, props)

Source from the content-addressed store, hash-verified

13802 */
13803
13804function validateProps(element, props) {
13805 // TODO (yungsters): Remove support for `selected` in <option>.
13806 {
13807 if (props.selected != null && !didWarnSelectedSetOnOption) {
13808 warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
13809 didWarnSelectedSetOnOption = true;
13810 }
13811 }
13812}
13813
13814function postMountWrapper$1(element, props) {
13815 // 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