import { useState } from "react"; export const useLazyRef = (init: () => T): T => { const [ret] = useState(init); return ret; };