UNPKG

@resourge/react-fetch

Version:

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

22 lines (21 loc) 674 B
/** * react-fetch v1.43.1 * * Copyright (c) resourge. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ /** * Returns the current network connectivity status. * @returns {boolean} True if connected, false otherwise. */ export declare function OnlineGetSnapshot(): boolean; /** * Subscribes to network connectivity changes. * @param {Function} callback - Function to call when network status changes. * @returns {Function} A function to unsubscribe from the network status updates. */ export declare function OnlineSubscribe(callback: () => void): () => void;