Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint about "replace" in "useNavigate" documentation #8991

Merged
merged 3 commits into from Jun 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Expand Up @@ -15,6 +15,7 @@
- christopherchudzicki
- cvbuelow
- edwin177
- elanis
- elylucas
- emzoumpo
- gijo-varghese
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks/use-navigate.md
Expand Up @@ -21,7 +21,7 @@ interface NavigateFunction {

</details>

The `useNavigate` hook returns a function that lets you navigate programmatically, for example after a form is submitted.
The `useNavigate` hook returns a function that lets you navigate programmatically, for example after a form is submitted. If using `replace: true`, the navigation will replace the current entry in the history stack instead of adding a new one.

```tsx
import { useNavigate } from "react-router-dom";
Expand Down