navigate

tcmts.atproto.lib.react.navigate · #vpimb636 · function · runs in the browser

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

Go to a path of the app without reloading the page (another site's URL is loaded), in a transition typed navigate and navigate-forward or navigate-back: what's on screen stays until the next page is ready. replace doesn't add a history entry; scroll (the default unless replace) scrolls to the top, or to the fragment.

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

export const navigate = (to: string, options?: { replace?: boolean; scroll?: boolean }): void =>
  router.navigate(to, options)

uses