useNavigationType
Returns the type of navigation used when the user arrived at the current location.
import { useNavigationType } from "@remix-run/react"; function SomeComponent() { const navigationType = useNavigationType(); // ... }
replace
action on the history stack: clicking a link with <Link replace>
, submitting a form with <Form replace>
or calling navigate(to, { replace: true })
, etc.navigate(-1)
or navigate(1)
, etc.