Class AsyncThunkCreator<TArg, TPayload>
The async thunk action creator.
Implements
IAsyncThunkCreator<TArg, TPayload>
Inherited Members
Namespace: Unity.AppUI.Redux
Assembly: Unity.AppUI.Redux.dll
Syntax
public class AsyncThunkCreator<TArg, TPayload> : AsyncThunkCreatorBase<TArg, TPayload>, IAsyncThunkCreator<TArg, TPayload>
Type Parameters
| Name | Description |
|---|---|
| TArg | The type of the thunk argument. |
| TPayload | The type of the payload. |
Constructors
AsyncThunkCreator(string, AsyncThunk<TArg, TPayload>, AsyncThunkOptions<TArg>)
Creates a new async thunk action creator.
Declaration
public AsyncThunkCreator(string type, AsyncThunk<TArg, TPayload> runner, AsyncThunkOptions<TArg> options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | The type of the action. |
| AsyncThunk<TArg, TPayload> | runner | The async thunk runner. |
| AsyncThunkOptions<TArg> | options | The options for the async thunk. |
Methods
Invoke(TArg)
Create the action to dispatch.
Declaration
public AsyncThunkAction<TArg, TPayload> Invoke(TArg arg)
Parameters
| Type | Name | Description |
|---|---|---|
| TArg | arg | The argument to pass to the thunk. |
Returns
| Type | Description |
|---|---|
| AsyncThunkAction<TArg, TPayload> | The async thunk action. |