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

Function getHostProps

code/controlled-uncontrolled/public/app.js:3794–3806  ·  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

3792 */
3793
3794function getHostProps(element, props) {
3795 var node = element;
3796 var checked = props.checked;
3797
3798 var hostProps = _assign({}, props, {
3799 defaultChecked: undefined,
3800 defaultValue: undefined,
3801 value: undefined,
3802 checked: checked != null ? checked : node._wrapperState.initialChecked
3803 });
3804
3805 return hostProps;
3806}
3807
3808function initWrapperState(element, props) {
3809 {

Callers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected