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

Function getHostProps

code/composition/public/app.js:4608–4620  ·  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

(element, props)

Source from the content-addressed store, hash-verified

4606 */
4607
4608function getHostProps(element, props) {
4609 var node = element;
4610 var checked = props.checked;
4611
4612 var hostProps = _assign({}, props, {
4613 defaultChecked: undefined,
4614 defaultValue: undefined,
4615 value: undefined,
4616 checked: checked != null ? checked : node._wrapperState.initialChecked
4617 });
4618
4619 return hostProps;
4620}
4621
4622function initWrapperState(element, props) {
4623 {

Callers 2

setInitialProperties$1Function · 0.70
diffProperties$1Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected