qol-hooks
Version:
A collection of React hooks to improve the quality of life of developers.
18 lines (17 loc) • 375 B
TypeScript
/**
* Custom hook to track the online status of the user.
* @returns {boolean} The online status of the user.
*
* @example```tsx
* const Component = () => {
* const isOnline = useOnlineStatus();
*
* return (
* <div>
* {isOnline ? "Online" : "Offline"}
* </div>
* )};
* ```
*/
declare function useOnlineStatus(): boolean;
export default useOnlineStatus;