Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
forbidals
/
democrm.trinadezambia.com
/
es2015
:
createRef.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * creates a Ref object with on change callback * @param callback * @returns {RefObject} * * @see {@link useCallbackRef} * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs */ export function createCallbackRef(callback) { var current = null; return { get current() { return current; }, set current(value) { var last = current; if (last !== value) { current = value; callback(value, last); } }, }; }