single-tab
Version:
A lightweight React library to detect and handle duplicate tabs in web applications
11 lines (10 loc) • 334 B
TypeScript
/**
* Custom hook to detect and handle duplicate tabs in a React application.
* @param appId - A unique identifier for your application.
* @returns Hook state for managing duplicate tabs.
*/
export declare const useSingleTab: (appId: string) => {
isDuplicate: boolean;
showWarning: boolean;
message: string | null;
};