Skip to content

Examples and guides for using the OpenAI API

337 B
Raw Blame
import * as React from "react"

function subscribeMounted() {
  return () => {}
}

function getMountedSnapshot() {
  return true
}

function getServerMountedSnapshot() {
  return false
}

export function useMounted() {
  return React.useSyncExternalStore(
    subscribeMounted,
    getMountedSnapshot,
    getServerMountedSnapshot
  )
}