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

Function isControlled

code/styling/public/app.js:4448–4451  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4446var didWarnUncontrolledToControlled = false;
4447
4448function isControlled(props) {
4449 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
4450 return usesChecked ? props.checked != null : props.value != null;
4451}
4452
4453/**
4454 * 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