Skip to content
Open
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
60 changes: 60 additions & 0 deletions docs/api/classes/NavigationAbandonedError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Classes: NavigationAbandonedError

Thrown when data a getter is waiting on is discarded because navigation moved elsewhere.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new NavigationAbandonedError(): NavigationAbandonedError;
```

#### Returns

`NavigationAbandonedError`

#### Overrides

```ts
Error.constructor
```

## Methods

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

## Properties

| Property | Type | Inherited from |
| ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `unknown` | `Error.cause` |
| <a id="message"></a> `message` | `string` | `Error.message` |
| <a id="name"></a> `name` | `string` | `Error.name` |
| <a id="stack"></a> `stack?` | `string` | `Error.stack` |
2 changes: 2 additions & 0 deletions docs/api/components/RouterLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A component to render a link to a route or any url.

## Param

**props**

The props to pass to the router link component.

## Returns
Expand Down
2 changes: 2 additions & 0 deletions docs/api/components/RouterView.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A component to render the current route's component.

## Param

**props**

The props to pass to the router view component.

## Returns
Expand Down
6 changes: 6 additions & 0 deletions docs/api/compositions/useLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ for navigating.

## Param

**source**

The name of the route or a valid URL.

## Param

**params**

If providing route name, this argument will expect corresponding params.

## Param

**options**

[RouterResolveOptions](../types/RouterResolveOptions.md) Same options as router resolve.

## Returns
Expand Down
4 changes: 4 additions & 0 deletions docs/api/compositions/useRoute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ if provided, throwing an error if the validation fails at any point during the c

## Template

**TRouteName**

A string type that should match route name of the registered router, ensuring the route name exists.

## Param

**routeName**

Optional. The name of the route to validate against the current active routes.

## Returns
Expand Down
67 changes: 67 additions & 0 deletions docs/api/errors/LoaderDataAccessError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Errors: LoaderDataAccessError

An error thrown when a loader reads the data of the route it belongs to. That data includes what the
loader itself is computing, so reading it could only wait on the loader that is doing the reading.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new LoaderDataAccessError(name?): LoaderDataAccessError;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name?` | `string` |

#### Returns

`LoaderDataAccessError`

#### Overrides

```ts
Error.constructor
```

## Methods

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

## Properties

| Property | Type | Inherited from |
| ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `unknown` | `Error.cause` |
| <a id="message"></a> `message` | `string` | `Error.message` |
| <a id="name"></a> `name` | `string` | `Error.name` |
| <a id="stack"></a> `stack?` | `string` | `Error.stack` |
68 changes: 68 additions & 0 deletions docs/api/errors/LoaderNameConflict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Errors: LoaderNameConflict

An error thrown when a loader is added with the same name as a loader on one of the route's ancestors.
A route's data combines the loaders of every match, so the same name twice would be ambiguous rather
than an override.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new LoaderNameConflict(name?): LoaderNameConflict;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name?` | `string` |

#### Returns

`LoaderNameConflict`

#### Overrides

```ts
Error.constructor
```

## Methods

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

## Properties

| Property | Type | Inherited from |
| ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `unknown` | `Error.cause` |
| <a id="message"></a> `message` | `string` | `Error.message` |
| <a id="name"></a> `name` | `string` | `Error.name` |
| <a id="stack"></a> `stack?` | `string` | `Error.stack` |
4 changes: 2 additions & 2 deletions docs/api/functions/createRoute.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Functions: createRoute()

```ts
function createRoute<TOptions, TProps>(options, ...args): ToRoute<TOptions, TProps> & InternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>> & RouteRedirects<ToRoute<TOptions>> & RouteSetTitle<ToRoute<TOptions>>;
function createRoute<TOptions, TProps>(options, ...args): RouteWithMethods<ToRouteUrl<TOptions>, ToRouteMatches<TOptions, TProps>>;
```

## Type Parameters
Expand All @@ -20,4 +20,4 @@ function createRoute<TOptions, TProps>(options, ...args): ToRoute<TOptions, TPro

## Returns

[`ToRoute`](../types/ToRoute.md)\<`TOptions`, `TProps`\> & `InternalRouteHooks`\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>, `ExtractRouteContext`\<`TOptions`\>\> & [`RouteRedirects`](../types/RouteRedirects.md)\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>\> & `RouteSetTitle`\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>\>
`RouteWithMethods`\<`ToRouteUrl`\<`TOptions`\>, `ToRouteMatches`\<`TOptions`, `TProps`\>\>
2 changes: 2 additions & 0 deletions docs/api/hooks/onAfterRouteLeave.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This can be used for cleanup actions after the component is no longer active, en

## Param

**AfterRouteHook**

The hook callback function

## Returns
Expand Down
2 changes: 2 additions & 0 deletions docs/api/hooks/onAfterRouteUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This is ideal for responding to updates within the same route, such as parameter

## Param

**AfterRouteHook**

The hook callback function

## Returns
Expand Down
2 changes: 2 additions & 0 deletions docs/api/hooks/onBeforeRouteLeave.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This is useful for performing actions or cleanups before navigating away from a

## Param

**BeforeRouteHook**

The hook callback function

## Returns
Expand Down
2 changes: 2 additions & 0 deletions docs/api/hooks/onBeforeRouteUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This is particularly useful for handling changes in route parameters or query wh

## Param

**BeforeRouteHook**

The hook callback function

## Returns
Expand Down
18 changes: 18 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
## Errors

- [DuplicateParamsError](errors/DuplicateParamsError.md)
- [LoaderDataAccessError](errors/LoaderDataAccessError.md)
- [LoaderNameConflict](errors/LoaderNameConflict.md)
- [MetaPropertyConflict](errors/MetaPropertyConflict.md)
- [RouterNotInstalledError](errors/RouterNotInstalledError.md)
- [UseRouteInvalidError](errors/UseRouteInvalidError.md)
Expand All @@ -24,6 +26,10 @@
- [isRoute](type-guards/isRoute.md)
- [isUrlString](type-guards/isUrlString.md)

## Classes

- [NavigationAbandonedError](classes/NavigationAbandonedError.md)

## Components

- [RouterLink](components/RouterLink.md)
Expand Down Expand Up @@ -63,7 +69,11 @@
- [AddBeforeLeaveHook](types/AddBeforeLeaveHook.md)
- [AddBeforeUpdateHook](types/AddBeforeUpdateHook.md)
- [AddErrorHook](types/AddErrorHook.md)
- [AddLoaderOptions](types/AddLoaderOptions.md)
- [AddRejectionHook](types/AddRejectionHook.md)
- [AddViewOptions](types/AddViewOptions.md)
- [AddViewPropsCallbackContext](types/AddViewPropsCallbackContext.md)
- [AddViewPropsGetter](types/AddViewPropsGetter.md)
- [AfterEnterHook](types/AfterEnterHook.md)
- [AfterEnterHookContext](types/AfterEnterHookContext.md)
- [AfterHookLifecycle](types/AfterHookLifecycle.md)
Expand All @@ -88,6 +98,7 @@
- [HookLifecycle](types/HookLifecycle.md)
- [HookRemove](types/HookRemove.md)
- [LiteralParam](types/LiteralParam.md)
- [LoaderGetter](types/LoaderGetter.md)
- [Param](types/Param.md)
- [ParamExtras](types/ParamExtras.md)
- [ParamGetSet](types/ParamGetSet.md)
Expand All @@ -112,6 +123,11 @@
- [ResolvedRoute](types/ResolvedRoute.md)
- [ResolvedRouteUnion](types/ResolvedRouteUnion.md)
- [Route](types/Route.md)
- [RouteAddLoader](types/RouteAddLoader.md)
- [RouteAddView](types/RouteAddView.md)
- [RouteCallbackContext](types/RouteCallbackContext.md)
- [RouteLoader](types/RouteLoader.md)
- [RouteLoaders](types/RouteLoaders.md)
- [RouteMeta](types/RouteMeta.md)
- [Router](types/Router.md)
- [RouterAssets](types/RouterAssets.md)
Expand All @@ -133,12 +149,14 @@
- [RouterRoutes](types/RouterRoutes.md)
- [RouterRouteUnion](types/RouterRouteUnion.md)
- [RouterViewPropsGetter](types/RouterViewPropsGetter.md)
- [RouteViews](types/RouteViews.md)
- [ToCallback](types/ToCallback.md)
- [ToRoute](types/ToRoute.md)
- [Url](types/Url.md)
- [UrlString](types/UrlString.md)
- [UseLink](types/UseLink.md)
- [UseLinkOptions](types/UseLinkOptions.md)
- [WithData](types/WithData.md)
- [WithHost](types/WithHost.md)
- [WithoutHost](types/WithoutHost.md)
- [WithoutParent](types/WithoutParent.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/type-guards/isRoute.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A guard to verify if a route or unknown value matches a given route name.

## Param

**routeName**

The name of the route to check against the current route.

## Returns
Expand Down
Loading