Skip to content

Commit 45fa820

Browse files
authored
docs(how-to/fetchers): fix import (#13628)
1 parent 3871596 commit 45fa820

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@
366366
- valerii15298
367367
- ValiantCat
368368
- vdusart
369+
- vesan
369370
- VictorElHajj
370371
- vijaypushkin
371372
- vikingviolinist

docs/how-to/fetchers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ export function UserSearchCombobox() {
219219

220220
```tsx lines=[2,5]
221221
import { useFetcher } from "react-router";
222-
import type { Search } from "./search-users";
222+
import type { loader } from "./search-users";
223223

224224
export function UserSearchCombobox() {
225-
let fetcher = useFetcher<typeof Search.action>();
225+
let fetcher = useFetcher<typeof loader>();
226226
// ...
227227
}
228228
```
@@ -235,7 +235,7 @@ Ensure you use `import type` so you only import the types.
235235
import { useFetcher } from "react-router";
236236

237237
export function UserSearchCombobox() {
238-
let fetcher = useFetcher<typeof Search.action>();
238+
let fetcher = useFetcher<typeof loader>();
239239
return (
240240
<div>
241241
<fetcher.Form method="get" action="/search-users">
@@ -261,7 +261,7 @@ Note you will need to hit "enter" to submit the form and see the results.
261261
import { useFetcher } from "react-router";
262262

263263
export function UserSearchCombobox() {
264-
let fetcher = useFetcher<typeof Search.action>();
264+
let fetcher = useFetcher<typeof loader>();
265265
return (
266266
<div>
267267
<fetcher.Form method="get" action="/search-users">

0 commit comments

Comments
 (0)