MCPcopy
hub / github.com/preactjs/preact / applyRef

Function applyRef

test/fixtures/preact.js:40–43  ·  view source on GitHub ↗
(ref, value)

Source from the content-addressed store, hash-verified

38 return obj;
39 }
40 function applyRef(ref, value) {
41 if ('function' == typeof ref) ref(value);
42 else if (null != ref) ref.current = value;
43 }
44 function cloneElement(vnode, props) {
45 return h(
46 vnode.nodeName,

Callers 4

setAccessorFunction · 0.70
recollectNodeTreeFunction · 0.70
setComponentPropsFunction · 0.70
unmountComponentFunction · 0.70

Calls 1

refFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…