[]previous and next page

useNavigation

The state of the navigation in flight, for global spinners and pending indicators.

The state of the navigation in flight, for global spinners and pending indicators.

Import#

ts
import { useNavigation } from "@shadow-js/router";

Signature#

ts
function useNavigation(): NavigationView

Returns#

A live view.

Examples#

ts
import { useNavigation } from "@shadow-js/router";
const navigation = useNavigation();
navigation.pending; // true after the pending delay of a navigation in flight, for a global spinner