MCPcopy Index your code
hub / github.com/microsoft/SandDance / isControlled

Function isControlled

docs/external/js/react-dom.development.js:1918–1921  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

1916 var didWarnUncontrolledToControlled = false;
1917
1918 function isControlled(props) {
1919 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
1920 return usesChecked ? props.checked != null : props.value != null;
1921 }
1922 /**
1923 * Implements an <input> host component that allows setting these optional
1924 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.

Callers 2

initWrapperStateFunction · 0.70
updateWrapperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected