Skip to content

Commit 20a1078

Browse files
rachaelmcqRachael McQuaterMichaelDeBoey
authored
docs(hooks/use-fetcher): add notice about index routes in load section (#7765)
Co-authored-by: Rachael McQuater <[email protected]> Co-authored-by: Michaël De Boey <[email protected]>
1 parent 2f26deb commit 20a1078

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@
563563
- ptitFicus
564564
- pwbriggs
565565
- pyr0gan
566+
- rachaelmcq
566567
- ramiroazar
567568
- RATIU5
568569
- raulfdm

docs/hooks/use-fetcher.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ fetcher.submit(
110110

111111
### `fetcher.load(href, options)`
112112

113-
Loads data from a route loader. While multiple nested routes can match a URL, only the leaf route will be called.
113+
Loads data from a route loader. While multiple nested routes can match a URL, only the leaf route will be called.
114+
115+
Note that when calling `load` on an index route's loader, you must include an [`?index` query param](../guides/index-query-param) in order to disambiguate between the `index.tsx` layout and the `root.tsx` route.
114116

115117
```ts
116118
fetcher.load("/some/route");

0 commit comments

Comments
 (0)