{
  "name": "use-ref-with-init",
  "type": "registry:hook",
  "files": [
    {
      "path": "hooks/use-ref-with-init.ts",
      "type": "registry:hook",
      "content": "import * as React from \"react\";\n\nfunction useRefWithInit<T>(init: () => T): React.RefObject<T> {\n  const [ref] = React.useState(() => ({ current: init() }));\n  return ref;\n}\n\nexport { useRefWithInit };\n",
      "target": ""
    }
  ]
}