From 854f4a41780089ad114fecef1a25111830f5cc0b Mon Sep 17 00:00:00 2001 From: Axel Date: Sat, 18 Jun 2022 02:20:57 +0200 Subject: [PATCH] Add hint about "replace" in "useNavigate" documentation (#8991) Co-authored-by: Tim Dorr --- contributors.yml | 1 + docs/hooks/use-navigate.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contributors.yml b/contributors.yml index 74f8e24e81..5709af1897 100644 --- a/contributors.yml +++ b/contributors.yml @@ -15,6 +15,7 @@ - christopherchudzicki - cvbuelow - edwin177 +- elanis - elylucas - emzoumpo - gijo-varghese diff --git a/docs/hooks/use-navigate.md b/docs/hooks/use-navigate.md index 8e97cb4739..e9fe71164f 100644 --- a/docs/hooks/use-navigate.md +++ b/docs/hooks/use-navigate.md @@ -21,7 +21,7 @@ interface NavigateFunction { -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";