⭐️ bestfetch

activeRequests

💁‍♀️ Heads up! Most apps never need to use this object.

An object for managing the active requests.

import { activeRequests } from 'bestfetch';

activeRequests has two methods:

isRequestInFlight

A method you can call to determine if a request is in flight for a given requestKey.

Arguments

  1. requestKey: The requestKey to check.

Returns

A boolean representing whether or not a request is in flight for the specified requestKey.

Example Usage

activeRequests.isRequestInFlight('my-request-key');

clear

Removes tracking on all in-flight requests. In-flight requests are not cancelled: calling this method only ensures that subsequent identical requests are not deduped.

Arguments

This method does not accept any arguments.

Returns

This method does not return anything.

Example Usage

activeRequests.clear();