---
url: >-
  https://lit-ui-router.dev/reference/lit-ui-router-ssr/client/functions/readResolvePayload.md
---
[lit-ui-router-ssr](../../index.md) / [client](../index.md) / readResolvePayload

# Function: readResolvePayload()

```ts
function readResolvePayload(container): 
  | ResolvePayload
  | undefined;
```

Defined in: [packages/lit-ui-router-ssr/src/client.ts:682](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-ssr/src/client.ts#L682)

Reads the resolve payload `prerender()` wrote into the container's
[hydration signature](readHydrationSignature.md): the state and url
parameters the document was drawn for, and the values its resolves settled
on, keyed by state name, then by resolve token.

[bootstrap](bootstrap.md) reads it on its own. A boot that calls [hydrateRoot](hydrateRoot.md)
directly hands it to `seed` from `ui-router-server/ssr/client` before the
router starts.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `container` | `ParentNode` | the element the server's markup was written into |

## Returns

| [`ResolvePayload`](../../index/interfaces/ResolvePayload.md)
| `undefined`

the payload, or `undefined` when the container holds no signature,
one from another release line of this package, or one without `resolves`

## Example

```ts
import { readResolvePayload } from 'lit-ui-router-ssr/client';
import { seed } from 'ui-router-server/ssr/client';
import type { UIRouterLit } from 'lit-ui-router';

declare const root: HTMLElement;
declare const router: UIRouterLit;

seed(router, readResolvePayload(root));
router.start();
```
