

# UseRequestEventsPropsType

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { UseRequestEventsPropsType } from "@hyper-fetch/react"
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [react/src/helpers/use-request-events/use-request-events.types.ts:21](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/react/src/helpers/use-request-events/use-request-events.types.ts#L21)

</p><div class="api-docs__section">

## Preview

</div><div class="api-docs__preview type">

```ts
type UseRequestEventsPropsType<T> = {
  actions: UseTrackedStateActions<T>; 
  dispatcher: Dispatcher; 
  logger: LoggerType; 
  request: T; 
  setCacheData: (cacheData: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>) => void; 
}
```

</div><div class="api-docs__section">

## Structure

</div><div class="api-docs__returns">

```ts
{
  actions: {
    setAdditionalData: (additionalData: ExtractAdapterAdditionalDataType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
    setData: (data: ExtractResponseType<T>, emitToCache?: boolean) => void;
    setError: (error: ExtractErrorType<T>, emitToCache?: boolean) => void;
    setIsSuccess: (isSuccess: boolean, emitToCache?: boolean) => void;
    setLoading: (loading: boolean, emitToHooks?: boolean) => void;
    setRetries: (retries: number, emitToCache?: boolean) => void;
    setStatus: (status: ExtractAdapterStatusType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
    setTimestamp: (timestamp: Date, emitToCache?: boolean) => void;
  };
  dispatcher: Dispatcher;
  logger: Record<LoggerLevelType, (message: LoggerMessageType, ...additionalData: LoggerMessageType[]) => void>;
  request: T;
  setCacheData: (cacheData: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>) => void;
}
```

</div>