Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
- valerii15298
- ValiantCat
- vdusart
- vesan
- VictorElHajj
- vijaypushkin
- vikingviolinist
Expand Down
8 changes: 4 additions & 4 deletions docs/how-to/fetchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ export function UserSearchCombobox() {

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

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

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

export function UserSearchCombobox() {
let fetcher = useFetcher<typeof Search.action>();
let fetcher = useFetcher<typeof loader>();
return (
<div>
<fetcher.Form method="get" action="/search-users">
Expand Down
Loading