Something went wrong. Try again.
A lexicon-driven AppView for ATProto.
Something went wrong. Try again.
TypeScript
1234567891011121314import * as React from "react";
function useLazyRef<T>(fn: () => T) { const ref = React.useRef<T | null>(null);
if (ref.current === null) { ref.current = fn(); }
return ref as React.RefObject<T>;}
export { useLazyRef };