---
schema_version: "1"
id: ecfae76302930c5be46ea79f5a4c5b4e6ee07a50b690f475c772cb52e0e8684d
title: RouteInstance
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwr-node/lwr/references/csr-reference/routeinstance.md
canonical_url: https://developer.salesforce.com/docs/platform/lwr/references/csr-reference/routeinstance.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3a213a28f8de5e84c9caf43fd7da525f7153b1bb27ca2a1c4bf17ef653faf2b5
products:
  - Lightning Web Runtime
---
# RouteInstance

A [route handler](https://developer.salesforce.com/docs/platform/lwr/guides/lwr-route-handler-modules.md) receives a `RouteInstance` when a new client-side navigation event occurs. `RouteInstance` contains location information passed to [`RouteHandler.update`](https://developer.salesforce.com/docs/platform/lwr/references/csr-reference/update.md). The route handler uses the `RouteInstance` to determine which view to show.

## Syntax

```
interface RouteInstance {
  id: string; // RouteDefinition.id
  pageReference: PageReference;
  label: string;
}
```

## Properties

| Property        | Type                   | Required/Optional | Description                                                              |
| --------------- | ---------------------- | ----------------- | ------------------------------------------------------------------------ |
| `id`            | String                 | Required          | The unique identifier for the [`RouteDefinition`](https://developer.salesforce.com/docs/platform/lwr/references/csr-reference/routedefinition.md).   |
| `pageReference` | `PageReference` object | Required          | The [`PageReference` object](https://developer.salesforce.com/docs/platform/lwr/references/csr-reference/pagereference.md) for the navigation event. |

## Example

```
{
    id: '1',
    pageReference: {
        type: 'animal',
        attributes: { pageName: 'animal' },
        state: {},
    },
},
```

**See Also**

- [Route Handler Modules](https://developer.salesforce.com/docs/platform/lwr/guides/lwr-route-handler-modules.md#3-the-router-passes-routeinstance-to-routehandlerupdate)
