# ReactorDataOf

> **ReactorDataOf**\<`R`, `M`\> = [`ReactorReturnOk`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/reactorreturnok/)\<[`ServiceOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/serviceof/)\<`R`\>, `M`, [`TransformOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/transformof/)\<`R`\>\>

Defined in: [core/src/types/reactor.ts:350](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/core/src/types/reactor.ts#L350)

What a reactor's method resolves with: the `Ok` value of a Candid `Result`,
or the whole result of a method that returns none, in the reactor's own
form. It is what `callMethod`, a mutation and its `execute()` resolve with,
`ReactorReturnOk<Service, M, Transform>` with the service and transform read
from `typeof reactor`.

The query hooks and factories cache it as
`ReactorQueryData<ReactorDataOf<R, M>>`, which is the same type unless the
result can be `undefined`: TanStack Query reserves `undefined` for "not
cached", so such a result is cached as `null`.

## Type Parameters

### R

`R` *extends* `object`

The reactor's type, as `typeof reactor`.

### M

`M` *extends* [`FunctionName`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/functionname/)\<[`ServiceOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/serviceof/)\<`R`\>\>

The method.

## Example

```typescript
const ledger = new DisplayReactor<Ledger>({ clientManager, name: "ledger", idlFactory })

type Balance = ReactorDataOf<typeof ledger, "icrc1_balance_of"> // string
```