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

Function isControlled

code/one-direction-data-flow/public/app.js:4321–4324  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4319var didWarnUncontrolledToControlled = false;
4320
4321function isControlled(props) {
4322 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
4323 return usesChecked ? props.checked != null : props.value != null;
4324}
4325
4326/**
4327 * 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