UNPKG

spicyhooks

Version:

A collection of spicy React hooks

21 lines (16 loc) 589 B
interface ScreenSize { screenWidth: number; screenHeight: number; } interface InViewElement { id: string; element: Element | null; } interface InViewElementOptions { options?: IntersectionObserverInit; baseOn?: 'id' | 'class'; } declare const useInViewElement: ({ options, baseOn, }?: InViewElementOptions) => InViewElement; declare const useScreenSize: () => ScreenSize; declare const useLocalStorage: <T>(key: string, initialValue: T | null) => readonly [T | null, (value: T) => void, () => void]; export { useInViewElement, useLocalStorage, useScreenSize };