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

Function isControlled

code/new-context-api/public/app.js:3809–3812  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

3807var didWarnUncontrolledToControlled = false;
3808
3809function isControlled(props) {
3810 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
3811 return usesChecked ? props.checked != null : props.value != null;
3812}
3813
3814/**
3815 * 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