MCPcopy Create free account
hub / github.com/reactjs/react-rails / ref

Function ref

lib/assets/react-source/development/react.js:17063–17076  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

17061 }
17062
17063 var ref = function (value) {
17064 var refs = inst.refs;
17065
17066 if (refs === emptyRefsObject) {
17067 // This is a lazy pooled frozen object, so we need to initialize.
17068 refs = inst.refs = {};
17069 }
17070
17071 if (value === null) {
17072 delete refs[stringRef];
17073 } else {
17074 refs[stringRef] = value;
17075 }
17076 };
17077
17078 ref._stringRef = stringRef;
17079 return ref;

Callers 1

commitAttachRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected