MCPcopy Index your code
hub / github.com/caseywebdev/react-list / commitHostMount

Function commitHostMount

docs/index.js:11113–11133  ·  view source on GitHub ↗
(finishedWork)

Source from the content-addressed store, hash-verified

11111 else ref.current = null;
11112}
11113function commitHostMount(finishedWork) {
11114 var type = finishedWork.type,
11115 props = finishedWork.memoizedProps,
11116 instance = finishedWork.stateNode;
11117 try {
11118 a: switch (type) {
11119 case "button":
11120 case "input":
11121 case "select":
11122 case "textarea":
11123 props.autoFocus && instance.focus();
11124 break a;
11125 case "img":
11126 props.src
11127 ? (instance.src = props.src)
11128 : props.srcSet && (instance.srcset = props.srcSet);
11129 }
11130 } catch (error) {
11131 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11132 }
11133}
11134function commitHostUpdate(finishedWork, newProps, oldProps) {
11135 try {
11136 var domElement = finishedWork.stateNode;

Calls 2

captureCommitPhaseErrorFunction · 0.85
runWithFiberInDEVFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…