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

Function getHostProps

code/styling/public/app.js:4470–4482  ·  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

4468 */
4469
4470function getHostProps(element, props) {
4471 var node = element;
4472 var checked = props.checked;
4473
4474 var hostProps = _assign({}, props, {
4475 defaultChecked: undefined,
4476 defaultValue: undefined,
4477 value: undefined,
4478 checked: checked != null ? checked : node._wrapperState.initialChecked
4479 });
4480
4481 return hostProps;
4482}
4483
4484function initWrapperState(element, props) {
4485 {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected