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

Function Forwarded

compat/src/forwardRef.js:27–31  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

25 */
26export function forwardRef(fn) {
27 function Forwarded(props) {
28 let clone = assign({}, props);
29 delete clone.ref;
30 return fn(clone, props.ref || null);
31 }
32
33 // mobx-react checks for this being present
34 Forwarded.$$typeof = REACT_FORWARD_SYMBOL;

Callers

nothing calls this directly

Calls 2

assignFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…