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

Function getHostProps

code/communication/public/app.js:4505–4517  ·  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

4503 */
4504
4505function getHostProps(element, props) {
4506 var node = element;
4507 var checked = props.checked;
4508
4509 var hostProps = _assign({}, props, {
4510 defaultChecked: undefined,
4511 defaultValue: undefined,
4512 value: undefined,
4513 checked: checked != null ? checked : node._wrapperState.initialChecked
4514 });
4515
4516 return hostProps;
4517}
4518
4519function initWrapperState(element, props) {
4520 {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected