Type Alias EffectParams<D, V>

EffectParams<D, V>: {
    context: Context<D>;
    event: EntryEvent<D, V>;
    isMounted: (() => boolean);
    send: Config.Send<D>;
    setContext: SetContext<D>;
}

The type of the effect parameters.

Type Parameters

  • D

    The type of the state machine definition.

  • V

    The type of state value.

Type declaration

  • Readonlycontext: Context<D>

    The current context of the state machine.

  • Readonlyevent: EntryEvent<D, V>

    The event that triggered the effect.

  • ReadonlyisMounted: (() => boolean)

    The function to check if the component is mounted.

      • (): boolean
      • Check if the component is mounted.

        Returns boolean

        true if the component is mounted, false otherwise.

  • Readonlysend: Config.Send<D>

    The send function to send an event to the state machine.

  • ReadonlysetContext: SetContext<D>

    The function to update the context of the state machine.