From a22f17d1d747418b70d285bef5d5a8649bd320e4 Mon Sep 17 00:00:00 2001 From: dfedoryshchev <64079946+dfedoryshchev@users.noreply.github.com> Date: Sun, 5 Jul 2026 01:44:41 +0100 Subject: [PATCH 1/2] docs: fix useNavigate example to pass state in the options argument (#15282) --- packages/react-router/lib/hooks.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/react-router/lib/hooks.tsx b/packages/react-router/lib/hooks.tsx index b0e297a7ff..ca1e1561a4 100644 --- a/packages/react-router/lib/hooks.tsx +++ b/packages/react-router/lib/hooks.tsx @@ -259,12 +259,16 @@ const navigateEffectWarning = * All properties are optional. * * ```tsx - * navigate({ - * pathname: "/some/route", - * search: "?search=param", - * hash: "#hash", - * state: { some: "state" }, - * }); + * navigate( + * { + * pathname: "/some/route", + * search: "?search=param", + * hash: "#hash", + * }, + * { + * state: { some: "state" }, + * }, + * ); * ``` * * If you use `state`, that will be available on the {@link Location} object on From 1216fa906b2f88a41bd991ccc89106d2cccb6a09 Mon Sep 17 00:00:00 2001 From: Remix Run Bot Date: Sun, 5 Jul 2026 00:45:47 +0000 Subject: [PATCH 2/2] chore: generate markdown docs from jsdocs --- docs/api/hooks/useNavigate.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/api/hooks/useNavigate.md b/docs/api/hooks/useNavigate.md index b2a98d2a79..0d2f834c7b 100644 --- a/docs/api/hooks/useNavigate.md +++ b/docs/api/hooks/useNavigate.md @@ -78,12 +78,16 @@ navigate("/some/route?search=param"); All properties are optional. ```tsx -navigate({ - pathname: "/some/route", - search: "?search=param", - hash: "#hash", - state: { some: "state" }, -}); +navigate( + { + pathname: "/some/route", + search: "?search=param", + hash: "#hash", + }, + { + state: { some: "state" }, + }, +); ``` If you use `state`, that will be available on the [`Location`](https://api.reactrouter.com/v8/interfaces/react-router.Location.html) object on