MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / validateProperties$1

Function validateProperties$1

code/composition/public/app.js:15954–15967  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

15952}
15953
15954function validateProperties$1(type, props) {
15955 if (type !== 'input' && type !== 'textarea' && type !== 'select') {
15956 return;
15957 }
15958
15959 if (props != null && props.value === null && !didWarnValueNull) {
15960 didWarnValueNull = true;
15961 if (type === 'select' && props.multiple) {
15962 warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.%s', type, getStackAddendum$1());
15963 } else {
15964 warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', type, getStackAddendum$1());
15965 }
15966 }
15967}
15968
15969function getStackAddendum$2() {
15970 var stack = ReactDebugCurrentFrame.getStackAddendum();

Callers 1

app.jsFile · 0.70

Calls 2

warningFunction · 0.85
getStackAddendum$1Function · 0.70

Tested by

no test coverage detected