sse-hooks
v1.3.0
Published
React hook library, ready to use, written in Typescript.
Readme
📡 Sensors
useAudioRecorder— A comprehensive hook for audio recording with real-time analysis using getUserMedia, MediaRecorder, and Web Audio APIs.useHover— Custom hook that tracks whether a DOM element is being hovered over.useMediaQuery— Custom hook that tracks the state of a media query using the [Match Media API](https://developer.useMediaSession— Custom hook that interacts with the [Media Session API](https://developer.useResizeObserver— Custom hook that observes the size of an element using the [ResizeObserver API](https://developer.useScreenShare— Custom hook that captures the user's screen or specific application window.useUserMedia— Custom hook that captures audio and video from the user's device.
💾 State
useBoolean— Custom hook that handles boolean state with useful utility functions.useCounter— Custom hook that manages a counter with increment, decrement, reset, and setCount functionalities.useMap— Custom hook that manages a key-value [Map](https://developer.useStep— Custom hook that manages and navigates between steps in a multi-step process.useToggle— Custom hook that manages a boolean toggle state in React components.
⚡ Side Effects
useCountdown— Custom hook that manages countdown.useDebounceCallback— Custom hook that creates a debounced version of a callback function.useDebounceValue— Custom hook that returns a debounced version of the provided value, along with a function to update it.useInterval— Custom hook that creates an interval that invokes a callback function at a specified delay using the [setInterval API](https://developer.useTimeout— Custom hook that handles timeouts in React components using the [setTimeout API](https://developer.
🔄 LifeCycle
useIsClient— Custom hook that determines if the code is running on the client side (in the browser).useIsMounted— Custom hook that determines if the component is currently mounted.useUnmount— Custom hook that runs a cleanup function when the component is unmounted.
🎨 DOM & UI
useClickAnyWhere— Custom hook that handles click events anywhere on the document.useClickAway— Custom hook that triggers a callback when a user clicks outside the referenced element.useDarkMode— Custom hook that returns the current state of the dark mode.useDocumentTitle— Custom hook that sets the document title.useScript— Custom hook that dynamically loads scripts and tracking their loading status.useScrollLock— A custom hook that locks and unlocks scroll.useTernaryDarkMode— Custom hook that manages ternary (system, dark, light) dark mode with local storage support.
📦 Storage
useIndexedDB— Custom hook that provides an interface to the [IndexedDB API](https://developer.useLocalStorage— Custom hook that uses the [localStorage API](https://developer.useSessionStorage— Custom hook that uses the [sessionStorage API](https://developer.
🌐 Network
useFetch— Custom hook that provides a wrapper around the native [fetch API](https://developer.
📦 Uncategorized
useCookie— Custom hook that manages state synchronized with a browser [cookie](https://developer.useCopyToClipboard— Custom hook that copies text to the clipboard using the [Clipboard API](https://developer.useEventCallback— Custom hook that creates a memoized event callback.useEventListener— .useForkRef— Merges refs into a single memoized callback ref ornull.useIntersectionObserver— Custom hook that tracks the intersection of a DOM element with its containing element or the viewport using the [Intersection Observer API](https://developer.useScreen— .useWindowSize— .useAudioRecorder— A comprehensive hook for audio recording with real-time analysis using getUserMedia, MediaRecorder, and Web Audio APIs.useBoolean— Custom hook that handles boolean state with useful utility functions.useClickAnyWhere— Custom hook that handles click events anywhere on the document.useClickAway— Custom hook that triggers a callback when a user clicks outside the referenced element.useCookie— Custom hook that manages state synchronized with a browser [cookie](https://developer.useCopyToClipboard— Custom hook that copies text to the clipboard using the [Clipboard API](https://developer.useCountdown— Custom hook that manages countdown.useCounter— Custom hook that manages a counter with increment, decrement, reset, and setCount functionalities.useDarkMode— Custom hook that returns the current state of the dark mode.useDebounceCallback— Custom hook that creates a debounced version of a callback function.useDebounceValue— Custom hook that returns a debounced version of the provided value, along with a function to update it.useDocumentTitle— Custom hook that sets the document title.useEventCallback— Custom hook that creates a memoized event callback.useEventListener— .useFetch— Custom hook that provides a wrapper around the native [fetch API](https://developer.useForkRef— Merges refs into a single memoized callback ref ornull.useHover— Custom hook that tracks whether a DOM element is being hovered over.useIndexedDB— Custom hook that provides an interface to the [IndexedDB API](https://developer.useIntersectionObserver— Custom hook that tracks the intersection of a DOM element with its containing element or the viewport using the [Intersection Observer API](https://developer.useInterval— Custom hook that creates an interval that invokes a callback function at a specified delay using the [setInterval API](https://developer.useIsClient— Custom hook that determines if the code is running on the client side (in the browser).useIsMounted— Custom hook that determines if the component is currently mounted.useLocalStorage— Custom hook that uses the [localStorage API](https://developer.useMap— Custom hook that manages a key-value [Map](https://developer.useMediaQuery— Custom hook that tracks the state of a media query using the [Match Media API](https://developer.useMediaSession— Custom hook that interacts with the [Media Session API](https://developer.useResizeObserver— Custom hook that observes the size of an element using the [ResizeObserver API](https://developer.useScreen— .useScreenShare— Custom hook that captures the user's screen or specific application window.useScript— Custom hook that dynamically loads scripts and tracking their loading status.useScrollLock— A custom hook that locks and unlocks scroll.useSessionStorage— Custom hook that uses the [sessionStorage API](https://developer.useStep— Custom hook that manages and navigates between steps in a multi-step process.useTernaryDarkMode— Custom hook that manages ternary (system, dark, light) dark mode with local storage support.useTimeout— Custom hook that handles timeouts in React components using the [setTimeout API](https://developer.useToggle— Custom hook that manages a boolean toggle state in React components.useUnmount— Custom hook that runs a cleanup function when the component is unmounted.useUserMedia— Custom hook that captures audio and video from the user's device.useWindowSize— .
🪝 Available Hooks
📡 Sensors
useAudioRecorder— A comprehensive hook for audio recording with real-time analysis using getUserMedia, MediaRecorder, and Web Audio APIs.useConferenceSystem— A comprehensive hook for managing video conferencing state, including camera access, screen sharing, network monitoring, and automatic media quality adjustment.useHover— Custom hook that tracks whether a DOM element is being hovered over.useMediaQuery— Custom hook that tracks the state of a media query using the [Match Media API](https://developer.useMediaSession— Custom hook that interacts with the [Media Session API](https://developer.useResizeObserver— Custom hook that observes the size of an element using the [ResizeObserver API](https://developer.useScreenShare— Custom hook that captures the user's screen or specific application window.useUserMedia— Custom hook that captures audio and video from the user's device.
💾 State
useBoolean— Custom hook that handles boolean state with useful utility functions.useCounter— Custom hook that manages a counter with increment, decrement, reset, and setCount functionalities.useMap— Custom hook that manages a key-value [Map](https://developer.useRoleGuard— Custom hook for Role-Based Access Control (RBAC).useStep— Custom hook that manages and navigates between steps in a multi-step process.useToggle— Custom hook that manages a boolean toggle state in React components.
⚡ Side Effects
useCountdown— Custom hook that manages countdown.useDebounceCallback— Custom hook that creates a debounced version of a callback function.useDebounceValue— Custom hook that returns a debounced version of the provided value, along with a function to update it.useInterval— Custom hook that creates an interval that invokes a callback function at a specified delay using the [setInterval API](https://developer.useTimeout— Custom hook that handles timeouts in React components using the [setTimeout API](https://developer.
🔄 LifeCycle
useIsClient— Custom hook that determines if the code is running on the client side (in the browser).useIsMounted— Custom hook that determines if the component is currently mounted.useUnmount— Custom hook that runs a cleanup function when the component is unmounted.
🎨 DOM & UI
useClickAnyWhere— Custom hook that handles click events anywhere on the document.useClickAway— Custom hook that triggers a callback when a user clicks outside the referenced element.useDarkMode— Custom hook that returns the current state of the dark mode.useDocumentTitle— Custom hook that sets the document title.useForkRef— Merges refs into a single memoized callback ref ornull.useScript— Custom hook that dynamically loads scripts and tracking their loading status.useScrollLock— A custom hook that locks and unlocks scroll.useTernaryDarkMode— Custom hook that manages ternary (system, dark, light) dark mode with local storage support.
📦 Storage
useCookie— Custom hook that manages state synchronized with a browser [cookie](https://developer.useIndexedDB— Custom hook that provides an interface to the [IndexedDB API](https://developer.useLocalStorage— Custom hook that uses the [localStorage API](https://developer.useSessionStorage— Custom hook that uses the [sessionStorage API](https://developer.
🌐 Network
useFetch— Custom hook that provides a wrapper around the native [fetch API](https://developer.useNetworkInformation— Custom hook that tracks the device's network connection status and details (speed, type) using the Network Information API.
🛠️ Utilities
useCopyToClipboard— Custom hook that copies text to the clipboard using the [Clipboard API](https://developer.useEventCallback— Custom hook that creates a memoized event callback.useKbd— Custom hook that detects the operating system (Mac vs.useMediaQuality— Custom hook to manage video stream quality by applying constraints (resolution and frame rate) to a MediaStream track.useSSR— Custom hook that detects the current environment (Browser, Server, or Native) and capability support (Workers, EventListeners).useSymbol— Custom hook for managing ES6 Symbols.
📦 Uncategorized
useEventListener— .useIntersectionObserver— Custom hook that tracks the intersection of a DOM element with its containing element or the viewport using the [Intersection Observer API](https://developer.useReadLocalStorage— .useScreen— .useWindowSize— .
