MCPcopy Create free account
hub / github.com/reactjs/react-rails / getHostProps

Function getHostProps

lib/assets/react-source/development/react.js:5512–5524  ·  view source on GitHub ↗

* Implements an host component that allows setting these optional * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. * * If `checked` or `value` are not supplied (or null/undefined), user actions * that affect the checked state or value will trigger updates to the ele

(element, props)

Source from the content-addressed store, hash-verified

5510
5511
5512 function getHostProps(element, props) {
5513 var node = element;
5514 var checked = props.checked;
5515
5516 var hostProps = _assign({}, props, {
5517 defaultChecked: undefined,
5518 defaultValue: undefined,
5519 value: undefined,
5520 checked: checked != null ? checked : node._wrapperState.initialChecked
5521 });
5522
5523 return hostProps;
5524 }
5525 function initWrapperState(element, props) {
5526 {
5527 ReactControlledValuePropTypes.checkPropTypes('input', props);

Callers 2

setInitialPropertiesFunction · 0.85
diffPropertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected