MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getSnapshot

Function getSnapshot

packages/dev/s2-docs/src/Router.tsx:26–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26export function getSnapshot() {
27 if (cachedSnapshot.promise !== navigationPromise || cachedSnapshot.pathname !== targetPathname) {
28 cachedSnapshot = {promise: navigationPromise, pathname: targetPathname};
29 }
30 return cachedSnapshot;
31}
32
33export function setNavigationPromise(promise: Promise<void> | null, pathname?: string) {
34 targetPathname = pathname || null;

Callers 2

useDelayedSnapshotFunction · 0.70
usePendingPageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected