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

Function getHostProps

code/dependency-injection/public/app.js:4563–4575  ·  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

4561 */
4562
4563function getHostProps(element, props) {
4564 var node = element;
4565 var checked = props.checked;
4566
4567 var hostProps = _assign({}, props, {
4568 defaultChecked: undefined,
4569 defaultValue: undefined,
4570 value: undefined,
4571 checked: checked != null ? checked : node._wrapperState.initialChecked
4572 });
4573
4574 return hostProps;
4575}
4576
4577function initWrapperState(element, props) {
4578 {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected