Developer Preview Feature
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
An LWR router receives navigation events as page references. Page references are a JSON-format specification of a location. You pass a PageReference object to the router via the navigate API.
1interface PageReference {
2 type: string;
3 attributes: { [key: string]: string | null };
4 state: { [key: string]: string | null };
5}| Property | Type | Required/Optional | Description |
|---|---|---|---|
type | string | Required | An identifier that’s a user-defined expression. |
attributes | array | Required | An array of user-defined key-value pairs. If there are no attribute values, set this property to null. |
state | array | Required | An array of user-defined key-value pairs. If there are no attribute values, set this property to null. |
1// URI
2https://www.somewhere.com/animals/abc?view=compact&dark-mode
3
4// page reference
5{
6 "type": "animal_page",
7 "attributes": {
8 "animalId": "abc"
9 },
10 "state": {
11 "view": "compact",
12 "dark-mode": ""
13 }
14}See Also
Developer Preview Feature