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

Function getHostProps

code/new-context-api/public/app.js:3831–3843  ·  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

3829 */
3830
3831function getHostProps(element, props) {
3832 var node = element;
3833 var checked = props.checked;
3834
3835 var hostProps = _assign({}, props, {
3836 defaultChecked: undefined,
3837 defaultValue: undefined,
3838 value: undefined,
3839 checked: checked != null ? checked : node._wrapperState.initialChecked
3840 });
3841
3842 return hostProps;
3843}
3844
3845function initWrapperState(element, props) {
3846 {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected