---
url: https://lit-ui-router.dev/reference/lit-ui-router/types/ContextCallback.md
---
[lit-ui-router](../index.md) / ContextCallback

# Type Alias: ContextCallback\<ValueType>

```ts
type ContextCallback<ValueType> = (value, unsubscribe?) => void;
```

Defined in: [packages/lit-ui-router/src/context.ts:44](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L44)

The callback a requester hands a provider. A provider that was asked to
`subscribe` may call it again as the value changes, passing `unsubscribe`.

## Type Parameters

| Type Parameter |
| ------ |
|  `ValueType` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `ValueType` |
| `unsubscribe?` | () => `void` |

## Returns

`void`
