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

Function isControlled

code/communication/public/app.js:4483–4486  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4481var didWarnUncontrolledToControlled = false;
4482
4483function isControlled(props) {
4484 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
4485 return usesChecked ? props.checked != null : props.value != null;
4486}
4487
4488/**
4489 * 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