• Returns the current navigation, defaulting to an "idle" navigation when no navigation is in progress. You can use this to render pending UI (like a global spinner) or read FormData from a form navigation.

    import { useNavigation } from "react-router"

    function SomeComponent() {
    let navigation = useNavigation();
    navigation.state
    navigation.formData
    // etc.
    }

    Returns Navigation