Skip to content

Commit

Permalink
docs: update RouterOptions with notFoundMode and `defaultViewTran…
Browse files Browse the repository at this point in the history
…sition`
  • Loading branch information
SeanCassiere committed Aug 14, 2024
1 parent 0063dca commit a2fe9b5
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/framework/react/api/router/RouterOptionsType.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ The `RouterOptions` type accepts an object with the following properties and met
- Optional
- The default `onCatch` handler for errors caught by the Router ErrorBoundary

### `defaultViewTransition` property

- Type: `boolean`
- Optional
- If `true`, route navigations will called using `document.startViewTransition()`.
- If the browser does not support this api, this option will be ignored.
- See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for more information on how this function works.

### `caseSensitive` property

- Type: `boolean`
Expand Down Expand Up @@ -176,7 +184,8 @@ The `RouterOptions` type accepts an object with the following properties and met
- Type: `React.Component`
- Optional
- A component that will be used to wrap the entire router. This is useful for providing a context to the entire router. Only non-DOM-rendering components like providers should be used, anything else will cause a hydration error.
**Example**

**Example**

```tsx
import { createRouter } from '@tanstack/react-router'
Expand Down Expand Up @@ -214,8 +223,16 @@ const router = createRouter({
})
```

### `notFoundMode` property

- Type: `'root' | 'fuzzy'`
- Optional
- Defaults to `'fuzzy'`
- This property controls how TanStack Router will handle scenarios where it cannot find a route to match the current location. See the [Not Found Errors guide](../../guide/not-found-errors.md) for more information.

### `notFoundRoute` property

- **Deprecated**
- Type: `NotFoundRoute`
- Optional
- A route that will be used as the default not found route for every branch of the route tree. This can be overridden on a per-branch basis by providing a not found route to the `NotFoundRoute` option on the root route of the branch.
Expand Down

0 comments on commit a2fe9b5

Please sign in to comment.