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

Function isControlled

code/third-party/public/app.js:3681–3684  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

3679var didWarnUncontrolledToControlled = false;
3680
3681function isControlled(props) {
3682 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
3683 return usesChecked ? props.checked != null : props.value != null;
3684}
3685
3686/**
3687 * Implements an <input> host component that allows setting these optional

Callers 2

initWrapperStateFunction · 0.70
updateWrapperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected