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

Function isControlled

code/composition/public/app.js:4586–4589  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4584var didWarnUncontrolledToControlled = false;
4585
4586function isControlled(props) {
4587 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
4588 return usesChecked ? props.checked != null : props.value != null;
4589}
4590
4591/**
4592 * 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