Function: runUnprotected()
Call Signature
function runUnprotected<T>(name, fn): T;
Runs a block in unprotected mode, as if it were run inside a model action. Structural mutations share one synchronous mutation batch, but the block is not recorded as an action. Consider using a proper model action when action recording is needed.
Type Parameters
| Type Parameter | Description |
|---|---|
T | Return type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Mobx action name. |
fn | () => T | Action block. |
Returns
T
Call Signature
function runUnprotected<T>(fn): T;
Runs a block in unprotected mode, as if it were run inside a model action. Structural mutations share one synchronous mutation batch, but the block is not recorded as an action. Consider using a proper model action when action recording is needed.
Type Parameters
| Type Parameter | Description |
|---|---|
T | Return type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
fn | () => T | Action block. |
Returns
T