/** * Creates an object URL for a file and revokes it when the file changes * or the component unmounts. * * Calling `URL.createObjectURL` inline while rendering mints a new blob URL on * every re-render and never releases it, so the browser holds every one of them * for the lifetime of the document. Creating it in an effect gives us a cleanup * hook to revoke on. * * A layout effect is used so the URL is in place before the browser paints — * with a plain effect the image would blink out for a frame whenever the * component remounts (for example when a sibling is removed and keys shift). * * Returns `null` while no file is given. */ export declare const useObjectUrl: (file?: File) => string | null;