Skip to content

Commit 688e58f

Browse files
committed
chore: generate markdown docs from jsdocs
1 parent be95911 commit 688e58f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/api/hooks/useNavigate.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ Internally, `useNavigate` uses a separate implementation when you are in
141141
Declarative mode versus Data/Framework mode - the primary difference being
142142
that the latter is able to return a stable reference that does not change
143143
identity across navigations. The implementation in Data/Framework mode also
144-
returns a `Promise` that resolves when the navigation is completed. This means
145-
the return type of `useNavigate` is `void | Promise<void>`. This is accurate,
146-
but can lead to some red squigglies based on the union in the return value:
144+
returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
145+
that resolves when the navigation is completed. This means the return type of
146+
`useNavigate` is `void | Promise<void>`. This is accurate, but can lead to
147+
some red squigglies based on the union in the return value:
147148
148149
- If you're using `typescript-eslint`, you may see errors from
149-
[`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises/)
150+
[`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises)
150151
- In Framework/Data mode, `React.use(navigate())` will show a false-positive
151152
`Argument of type 'void | Promise<void>' is not assignable to parameter of
152153
type 'Usable<void>'` error

0 commit comments

Comments
 (0)