@storm-stack/hooks
Version:
A collection of React hooks used by Storm Software in various client libraries and applications.
14 lines (13 loc) • 438 B
TypeScript
/**
* Subscribes to network state changes.
*
* @param callback - The callback function to call when the network state changes
* @returns A function to unsubscribe from the network state changes
*/
export declare const useNetworkStateSubscribe: (callback: (event: Event) => any) => () => void;
/**
* A hook that returns the network state.
*
* @returns The network state
*/
export declare function useNetworkState(): NetworkState;