docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AsyncThunkAPIExtensions

    Extensions for the async thunk API.

    Inheritance
    object
    AsyncThunkAPIExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Redux
    Assembly: Unity.AppUI.Redux.dll
    Syntax
    public static class AsyncThunkAPIExtensions

    Methods

    Dispatch(IThunkAPI, string)

    Dispatches an action type to the store.

    Declaration
    public static void Dispatch(this IThunkAPI api, string actionType)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    string actionType

    The action type to dispatch.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the thunk API is null.

    Dispatch(IThunkAPI, ActionCreator)

    Dispatches an action creator to the store.

    Declaration
    public static void Dispatch(this IThunkAPI api, ActionCreator creator)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    ActionCreator creator

    The action creator to dispatch.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the action creator or thunk API is null.

    Dispatch(IThunkAPI, IAction)

    Dispatches an action to the store.

    Declaration
    public static void Dispatch(this IThunkAPI api, IAction action)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    IAction action

    The action to dispatch.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the action or thunk API is null.

    Dispatch<TPayload>(IThunkAPI, string, TPayload)

    Dispatches an action type to the store.

    Declaration
    public static void Dispatch<TPayload>(this IThunkAPI api, string actionType, TPayload payload)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    string actionType

    The action type to dispatch.

    TPayload payload

    The payload to pass to the action creator.

    Type Parameters
    Name Description
    TPayload

    The type of the payload for the action to dispatch.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the thunk API is null.

    Dispatch<TPayload>(IThunkAPI, ActionCreator<TPayload>, TPayload)

    Dispatches an action creator with a payload to the store.

    Declaration
    public static void Dispatch<TPayload>(this IThunkAPI api, ActionCreator<TPayload> creator, TPayload payload)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    ActionCreator<TPayload> creator

    The action creator to dispatch.

    TPayload payload

    The payload to pass to the action creator.

    Type Parameters
    Name Description
    TPayload

    The type of the payload for the action to dispatch.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the action creator or thunk API is null.

    GetState<TState>(IThunkAPI)

    Gets the state of the store.

    Declaration
    public static TState GetState<TState>(this IThunkAPI api)
    Parameters
    Type Name Description
    IThunkAPI api

    The thunk API.

    Returns
    Type Description
    TState

    The state of the store.

    Type Parameters
    Name Description
    TState

    The type of the store state.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the thunk API is null.

    InvalidOperationException

    Thrown if the store does not implement IStore.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)