13 / 14

List important routing related hooks?

  1. 1

    useRoutes: Hook version of <Routes> that uses objects instead of components. These objects have the same properties as the component props.

  2. 2

    useParams: Returns an object of key/value pairs of the dynamic params from the current URL that were matched by the routes. Child routes inherit all params from their parent routes.

  3. 3

    useSearchParams: Returns a tuple of the current URL's URLSearchParams and a function to update them. Setting the search params causes a navigation.

  4. 4

    useLocation: Returns the current Location. This can be useful if you'd like to perform some side effect whenever it changes.

  5. 5

    useNavigate : Returns a function that lets you navigate programmatically in the browser in response to user interactions or effects.

  6. 6

    useSubmit: The imperative version of <Form> that lets you submit a form from code instead of a user interaction.