> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: BranchComparisonController

> One comparison read page by page.

[browser](/api/modules/browser).BranchComparisonController

One comparison read page by page. `more()` continues with the returned
cursor; the answer replaces the whole prefix, re-read at the same revisions
under current authority. A refresh of any compared branch ends the cursor:
start again. Framework-free: bind it with `useSyncExternalStore`.

## Constructors

### constructor

• **new BranchComparisonController**(`call`, `request`)

#### Parameters

| Name | Type |
| :- | :- |
| `call` | [`BranchLifecycleCall`](/api/modules/browser#branchlifecyclecall) |
| `request` | `Omit`\<[`CompareBranchesRequest`](/api/modules/browser#comparebranchesrequest), `"pagination"`> & \{ `pageSize`: `number` ; `creationOrder?`: `"asc"` \| `"desc"`  } |

## Methods

### getSnapshot

▸ **getSnapshot**(): [`BranchComparisonState`](/api/modules/browser#branchcomparisonstate)

#### Returns

[`BranchComparisonState`](/api/modules/browser#branchcomparisonstate)

***

### subscribe

▸ **subscribe**(`listener`): () => `void`

#### Parameters

| Name | Type |
| :- | :- |
| `listener` | () => `void` |

#### Returns

`fn`

▸ (): `void`

##### Returns

`void`

***

### more

▸ **more**(): `Promise`\<`void`>

Read the next page of every unfinished side.

#### Returns

`Promise`\<`void`>

***

### restart

▸ **restart**(): `Promise`\<`void`>

Start again at fresh head revisions.

#### Returns

`Promise`\<`void`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.