navigate

tcmts.react.navigate · #mukvz3fu · term · runs in the browser

uses tcmts.react.router, which uses tcmts.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/react";

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

uses

used by