MCPcopy Create free account
hub / github.com/microsoft/SandDance / getHostProps

Function getHostProps

docs/external/js/react-dom.development.js:1940–1952  ·  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

(element, props)

Source from the content-addressed store, hash-verified

1938
1939
1940 function getHostProps(element, props) {
1941 var node = element;
1942 var checked = props.checked;
1943
1944 var hostProps = _assign({}, props, {
1945 defaultChecked: undefined,
1946 defaultValue: undefined,
1947 value: undefined,
1948 checked: checked != null ? checked : node._wrapperState.initialChecked
1949 });
1950
1951 return hostProps;
1952 }
1953 function initWrapperState(element, props) {
1954 {
1955 ReactControlledValuePropTypes.checkPropTypes('input', props);

Callers 2

setInitialPropertiesFunction · 0.85
diffPropertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected