Sanity Library Reference Docs
    Preparing search index...

    Function useApplicationForegroundId

    • Returns the id of the application in the foreground, or null when Dashboard has none.

      Suspends until Dashboard publishes the foreground application.

      Returns string | null

      function ForegroundApplication() {
      const foregroundId = useApplicationForegroundId()
      return <span>{foregroundId ?? 'No foreground application'}</span>
      }