Skip to content

Commit

Permalink
docs: remove the invalid context and location arguments from bein…
Browse files Browse the repository at this point in the history
…g shown as "available" in the `loaderDeps` route method (#2091)
  • Loading branch information
SeanCassiere authored Aug 6, 2024
1 parent 43d9200 commit 2423d02
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/framework/react/api/router/RouteOptionsType.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,13 @@ type loader = (
- Type:
```tsx
type loaderDeps = (opts: {
search: TFullSearchSchema
location: ParsedLocation
context: TAllContext
}) => Record<string, any>
type loaderDeps = (opts: { search: TFullSearchSchema }) => Record<string, any>
```
- Optional
- [`ParsedLocation`](./ParsedLocationType.md)
- A function that will be called before this route is matched to provide additional unique identification to the route match and serve as a dependency tracker for when the match should be reloaded. It should return any serializable value that can uniquely identify the route match from navigation to navigation.
- By default, path params are already used to uniquely identify a route match, so it's unnecessary to return these here.
- If your route match relies on search params or context values for unique identification, it's required that you return them here so they can be made available in the `loader`'s `deps` argument.
- If your route match relies on search params for unique identification, it's required that you return them here so they can be made available in the `loader`'s `deps` argument.
### `staleTime` property
Expand Down

0 comments on commit 2423d02

Please sign in to comment.