useAppUpdate

tcmts.atproto.lib.react.useAppUpdate · #dtz3gi3m · function · runs in the browser

uses tcmts.atproto.lib.react.router, which uses tcmts.atproto.lib.react.createRouter, which uses IntersectionObserver

Whether a new version of the app is ready: a PWA's service worker took the new build in (reload loads it now). Always false for an app that isn't a PWA, and until the page is hydrated.

import { router } from "#codebase/tcmts/atproto/lib/react";

export const useAppUpdate = (): { ready: boolean; reload(): void } => router.useAppUpdate()

uses