This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateElementInRef(element, ref) { | |
if (typeof ref === 'function') { | |
/* | |
The ref is a callback ref. | |
https://reactjs.org/docs/refs-and-the-dom.html#callback-refs | |
*/ | |
ref(element) | |
} else if (ref) { | |
/* | |
The ref is an object expected to be mutated with property `current`. |
OlderNewer