MCPcopy Create free account
hub / github.com/Lobos/react-ui / attachRef

Function attachRef

docs/lib/react.js:13175–13182  ·  view source on GitHub ↗
(ref, component, owner)

Source from the content-addressed store, hash-verified

13173var ReactRef = {};
13174
13175function attachRef(ref, component, owner) {
13176 if (typeof ref === 'function') {
13177 ref(component.getPublicInstance());
13178 } else {
13179 // Legacy ref
13180 ReactOwner.addComponentAsRefTo(component, ref, owner);
13181 }
13182}
13183
13184function detachRef(ref, component, owner) {
13185 if (typeof ref === 'function') {

Callers 1

react.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…