`, `
```
If the user enters "journey" into the input and submits it, they will navigate to:
```
/search?q=journey
```
Forms with `` will also navigate to the action prop but will submit the data as `FormData` instead of `URLSearchParams`. However, it is more common to `useFetcher()` to POST form data. See [Using Fetchers](../../how-to/fetchers).
## redirect
Inside of route loaders and actions, you can return a `redirect` to another URL.
```tsx
import { redirect } from "react-router";
export async function loader({ request }) {
let user = await getUser(request);
if (!user) {
return redirect("/login");
}
return { userName: user.name };
}
```
It is common to redirect to a new record after it has been created:
```tsx
import { redirect } from "react-router";
export async function action({ request }) {
let formData = await request.formData();
let project = await createProject(formData);
return redirect(`/projects/${project.id}`);
}
```
## useNavigate
This hook allows the programmer to navigate the user to a new page without the user interacting. Usage of this hook should be uncommon. It's recommended to use the other APIs in this guide when possible.
Reserve usage of `useNavigate` to situations where the user is _not_ interacting but you need to navigate, for example:
- Logging them out after inactivity
- Timed UIs like quizzes, etc.
```tsx
import { useNavigate } from "react-router";
export function useLogoutAfterInactivity() {
let navigate = useNavigate();
useFakeInactivityHook(() => {
navigate("/logout");
});
}
```
---
Next: [Pending UI](./pending-ui)