useLocation

tcmts.atproto.lib.react.useLocation · #be37mpco · function · runs in the browser

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

Where the page is; the component re-renders when it changes. While the server renders the first paint, the page's URL. Under a base, path is within it: / is the base.

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

export const useLocation = (): Where => router.useLocation()

uses