The context action creators.

interface ContextActionCreators {
    setContext(
        payload: SetContextPayload,
    ): { payload: SetContextPayload; type: string };
    setLocation(
        payload: Required<Pick<UserParams, "latitude" | "longitude">>,
    ): {
        payload: Required<Pick<UserParams, "latitude" | "longitude">>;
        type: string;
    };
    setView(payload: SetViewPayload): { payload: SetViewPayload; type: string };
}

Methods

  • Sets the entire context.

    Parameters

    Returns { payload: SetContextPayload; type: string }

    A dispatchable action.

  • Sets the location context property without modifying any other context properties.

    Parameters

    • payload: Required<Pick<UserParams, "latitude" | "longitude">>

      The action creator payload.

    Returns { payload: Required<Pick<UserParams, "latitude" | "longitude">>; type: string }

    A dispatchable action.

  • Sets the view context property without modifying any other context properties.

    Parameters

    Returns { payload: SetViewPayload; type: string }

    A dispatchable action.