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();
// ...
}
<Link replace>
, submitting a form with <Form replace>
or calling navigate(to, { replace: true })
, etc.navigate(-1)
or navigate(1)
, etc.