Function: transaction()
ts
function transaction<T>(action: () => T, thisArg?: undefined): T;Defined in: mobx:
During a transaction no views are updated until the end of the transaction. The transaction will be run synchronously nonetheless.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
action | () => T | a function that updates some reactive state |
thisArg? | undefined | - |
Returns
T
any value that was returned by the 'action' parameter.