@iminside/react-yandex-maps
Version:
Yandex.Maps API bindings for React
10 lines (9 loc) • 383 B
TypeScript
/**
* Mimics React ref behavior. First cleans oldRef, if possible, then applies new ref value
* https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs
*
* @param {Object<{current: T}> | Function} oldRef
* @param {Object<{current: T}> | Function?} newRef
* @param {T?} value
*/
export default function applyRef(oldRef: any, newRef: any, value?: null): void;