---
url: >-
  https://lit-ui-router.dev/reference/lit-ui-router-mobx/interfaces/RouterReactionControllerOptions.md
---
[lit-ui-router-mobx](../index.md) / RouterReactionControllerOptions

# Interface: RouterReactionControllerOptions\<T>

Defined in: [lit-ui-router-mobx/src/router-reaction-controller.ts:11](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-mobx/src/router-reaction-controller.ts#L11)

Options for [RouterReactionController](../classes/RouterReactionController.md).

## Extends

* [`ReactionControllerOptions`](ReactionControllerOptions.md)<`T`>

## Type Parameters

| Type Parameter |
| ------ |
|  `T` |

## Properties

| Property | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `equals?` | [`IEqualsComparer`](https://mobx.js.org/computeds.html#built-in-comparers)<`T`> | Comparer deciding whether the selected value changed (e.g. `compareStructural` on mobx 7, `comparer.structural` on mobx 6). Defaults to MobX's identity comparer. | [`ReactionControllerOptions`](ReactionControllerOptions.md).[`equals`](ReactionControllerOptions.md#equals) | [lit-ui-router-mobx/src/reaction-controller.ts:26](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-mobx/src/reaction-controller.ts#L26) |
|  `initialValue?` | `T` | Value exposed on `.value` before the first reaction run — that is, before `hostConnected`, and on any host that renders while disconnected (SSR). Without it `.value` is `undefined` until the host connects, which is safe to render but not to read a property of. | [`ReactionControllerOptions`](ReactionControllerOptions.md).[`initialValue`](ReactionControllerOptions.md#initialvalue) | [lit-ui-router-mobx/src/reaction-controller.ts:19](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-mobx/src/reaction-controller.ts#L19) |
|  `onChange?` | (`value`) => `void` | Invoked (before `host.requestUpdate()`) whenever the selected value changes — and once on every host (re)connect. Use for effects such as resetting component state from route params. | [`ReactionControllerOptions`](ReactionControllerOptions.md).[`onChange`](ReactionControllerOptions.md#onchange) | [lit-ui-router-mobx/src/reaction-controller.ts:11](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-mobx/src/reaction-controller.ts#L11) |
|  `router?` | [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html) | Explicit router instance. When omitted, the controller asks the nearest router provider on `hostConnected` over `context-request` (via [requestRouter](https://lit-ui-router.dev/reference/lit-ui-router/core/requestRouter) with `subscribe: true`). It rebinds when a subscribed provider hands it the router that replaces its placeholder. | - | [lit-ui-router-mobx/src/router-reaction-controller.ts:21](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router-mobx/src/router-reaction-controller.ts#L21) |
