MCPcopy Create free account
hub / github.com/caseywebdev/react-list / validateInputProps

Function validateInputProps

docs/index.js:20234–20253  ·  view source on GitHub ↗
(element, props)

Source from the content-addressed store, hash-verified

20232 );
20233 }
20234 function validateInputProps(element, props) {
20235 void 0 === props.checked ||
20236 void 0 === props.defaultChecked ||
20237 didWarnCheckedDefaultChecked ||
20238 (console.error(
20239 "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
20240 getCurrentFiberOwnerNameInDevOrNull() || "A component",
20241 props.type
20242 ),
20243 (didWarnCheckedDefaultChecked = !0));
20244 void 0 === props.value ||
20245 void 0 === props.defaultValue ||
20246 didWarnValueDefaultValue$1 ||
20247 (console.error(
20248 "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
20249 getCurrentFiberOwnerNameInDevOrNull() || "A component",
20250 props.type
20251 ),
20252 (didWarnValueDefaultValue$1 = !0));
20253 }
20254 function updateInput(
20255 element,
20256 value,

Callers 2

setInitialPropertiesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…