diff --git a/src/use-is-online/index.ts b/src/use-is-online/index.ts index 42cf6732..e931cffd 100644 --- a/src/use-is-online/index.ts +++ b/src/use-is-online/index.ts @@ -19,7 +19,8 @@ const getSnapshot: Parameters[1] = () => { return navigator.onLine; }; -export function usePageVisibility() { +/** @see https://foxact.skk.moe/use-is-online */ +export function useIsOnline() { return useSyncExternalStore( subscribe, getSnapshot, diff --git a/src/use-page-visibility/index.ts b/src/use-page-visibility/index.ts index 03bb56ce..5bb21398 100644 --- a/src/use-page-visibility/index.ts +++ b/src/use-page-visibility/index.ts @@ -17,6 +17,7 @@ const getSnapshot: Parameters[1] = () => { return !document.hidden; }; +/** @see https://foxact.skk.moe/use-page-visibility */ export function usePageVisibility() { return useSyncExternalStore( handlePageVisibilityChange, diff --git a/src/use-typescript-happy-callback/index.ts b/src/use-typescript-happy-callback/index.ts index 4b37ddef..03a79161 100644 --- a/src/use-typescript-happy-callback/index.ts +++ b/src/use-typescript-happy-callback/index.ts @@ -1,7 +1,10 @@ import { useCallback as useCallbackFromReact } from 'react'; +/** @see https://foxact.skk.moe/use-typescript-happy-callback */ export const useTypeScriptHappyCallback: ( fn: (...args: Args) => R, deps: React.DependencyList ) => (...args: Args) => R = useCallbackFromReact; + +/** @see https://foxact.skk.moe/use-typescript-happy-callback */ export const useCallback = useTypeScriptHappyCallback;