useNavigationType

useNavigationType

Type declaration
declare function useNavigationType(): NavigationType;

type NavigationType = "POP" | "PUSH" | "REPLACE";

This hook returns the current type of navigation or how the user came to the current page; either via a pop, push, or replace action on the history stack.

Docs and examples CC 4.0