Skip to content

Commit

Permalink
Add hint about "replace" in "useNavigate" documentation (#8991)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com>
  • Loading branch information
Elanis and timdorr committed Jun 18, 2022
1 parent f9c4a0e commit 854f4a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 854f4a4

Please sign in to comment.