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

Function validateTextareaProps

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

Source from the content-addressed store, hash-verified

20432 (didWarnValueDefaultValue = !0));
20433 }
20434 function validateTextareaProps(element, props) {
20435 void 0 === props.value ||
20436 void 0 === props.defaultValue ||
20437 didWarnValDefaultVal ||
20438 (console.error(
20439 "%s contains a textarea with both value and defaultValue props. Textarea 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 textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
20440 getCurrentFiberOwnerNameInDevOrNull() || "A component"
20441 ),
20442 (didWarnValDefaultVal = !0));
20443 null != props.children &&
20444 null == props.value &&
20445 console.error(
20446 "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
20447 );
20448 }
20449 function updateTextarea(element, value, defaultValue) {
20450 if (
20451 null != 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…