📄️ useRexoraState
useRexoraState is a custom React hook that provides a flexible way to manage state using a reducer pattern. It allows you to set, reset, and remove specific keys from a state object.
📄️ useRexoraBoolean
The useRexoraBoolean hook is a simple utility hook for managing a boolean state with dedicated functions to set it to true, false, or toggle its value.
📄️ useRexoraIdle
The useRexoraIdle hook detects if the user is idle based on their activity (mousemove, keydown, scroll, etc.).
📄️ useRexoraAsync
The useRexoraAsync hook is a React hook that simplifies handling asynchronous operations, such as Promises or async functions, by managing their state (loading, success, error).
📄️ use-rexora-debounce-effect
---
📄️ useRexoraDebounce
The useRexoraDebounce hook provides a way to debounce a value in your React components. This is useful when you have a value that changes frequently, and you want to perform an action based on that value only after a certain period of inactivity.
📄️ useRexoraDocumentVisibility
---
📄️ useRexoraFetch
The useRexoraFetch hook provides a simplified and declarative way to perform data fetching in your React components. It abstracts away the complexities of managing fetch requests, loading states, and errors.
📄️ useRexoraFirstRender
The useRexoraFirstRender hook is a simple utility that returns a boolean value indicating whether the current render is the first render of the component.
📄️ useRexoraForceUpdate
The useRexoraForceUpdate hook provides a simple way to force a component to re-render. While React typically handles re-renders based on state and prop changes, there might be rare cases where you need to imperatively trigger an update.
📄️ useRexoraHover
The useRexoraHover hook is a utility that detects whether a specified DOM element is currently being hovered over by the user's mouse. It provides a simple boolean value that updates in real-time based on mouse enter and leave events on the target element.
📄️ useRexoraInterval
The useRexoraInterval hook provides a convenient way to set up and manage an interval in a React component. It allows you to execute a callback function repeatedly at a specified time interval and provides a function to clear the interval when needed.
📄️ useRexoraIsomorphicLayoutEffect
The useRexoraIsomorphicLayoutEffect hook is an isomorphic version of React's useLayoutEffect. It functions identically to useLayoutEffect on the client-side, running synchronously after all DOM mutations. However, unlike useLayoutEffect, it gracefully degrades to a useEffect on the server-side to prevent warnings and errors during server rendering.
📄️ useRexoraLatest
The useRexoraLatest hook provides a way to access the most recent value of a state or prop, even from within closures that might have captured an older value. This is particularly useful in scenarios where you need to access the current value of a dependency inside effects or event handlers without adding that dependency to the dependency array, which could cause unwanted re-executions.
📄️ useRexoraMounted
useRexoraMounted can be imported from @rexora/hooks.
📄️ useRexoraOnline
The useRexoraOnline hook is a simple utility hook that allows you to detect if the user's browser is currently online or offline. It leverages the browser's navigator.onLine property and listens for online and offline events to provide a reactive state reflecting the network connection status.
📄️ useRexoraRenderCount
The useRexoraRenderCount hook tracks and returns the number of times a component has rendered. This hook is primarily useful for debugging and understanding component render behavior.
📄️ useRexoraRetry
The useRexoraRetry hook provides a mechanism to automatically retry a failed asynchronous operation (like a fetch request) a specified number of times with optional delays between retries.
📄️ useRexoraThrottle
useRexoraThrottle is a custom React hook that throttles a value or a function. Throttling is a technique used to limit the rate at which a function or value is updated. When you throttle, the function is guaranteed to execute at most once within a specified time interval, even if it's called multiple times during that interval.
📄️ useRexoraTimeout
The useRexoraTimeout hook provides a convenient way to set and clear a timeout within a React component. It ensures that the timeout is properly cleared when the component unmounts or when the delay or callback function changes.
📄️ useRexoraToggle
useRexoraToggle is a custom React hook that simplifies the management of a boolean state, providing a convenient function to toggle its value.
📄️ useRexoraUpdateEffect
The useRexoraUpdateEffect hook is similar to React's built-in useEffect, but with one key difference: it does not run on the initial render of the component. It only executes the effect function when the dependencies array changes. This is useful when you need to perform side effects only in response to updates, and not when the component first mounts.