Skip to content

Commit 40f9ab7

Browse files
authored
Refine wording in external data loading guide (#5015)
1 parent 3f05c0b commit 40f9ab7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/router/framework/react/guide/external-data-loading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Literally any library that **can return a promise and read/write data** can be i
3434

3535
## Using Loaders to ensure data is loaded
3636

37-
The easiest way to use integrate and external caching/data library into Router is to use `route.loader`s to ensure that the data required inside of a route has been loaded and is ready to be displayed.
37+
The easiest way to integrate external caching/data library into Router is to use `route.loader`s to ensure that the data required inside of a route has been loaded and is ready to be displayed.
3838

3939
> ⚠️ BUT WHY? It's very important to preload your critical render data in the loader for a few reasons:
4040
>
@@ -102,7 +102,7 @@ export const Route = createFileRoute('/posts')({
102102

103103
### Error handling with TanStack Query
104104

105-
When an error occurs while using `suspense` with `TanStack Query`, you'll need to let queries know that you want to try again when re-rendering. This can be done by using the `reset` function provided by the `useQueryErrorResetBoundary` hook. We can invoke this function in an effect as soon as the error component mounts. This will make sure that the query is reset and will try to fetch data again when the route component is rendered again. This will also cover cases where users navigate away from our route instead of clicking the `retry` button.
105+
When an error occurs while using `suspense` with `TanStack Query`, you need to let queries know that you want to try again when re-rendering. This can be done by using the `reset` function provided by the `useQueryErrorResetBoundary` hook. You can invoke this function in an effect as soon as the error component mounts. This will make sure that the query is reset and will try to fetch data again when the route component is rendered again. This will also cover cases where users navigate away from the route instead of clicking the `retry` button.
106106

107107
```tsx
108108
export const Route = createFileRoute('/')({

0 commit comments

Comments
 (0)