Releases: siberiacancode/reactuse
v1.0.1
Improve hook
This release improves useInfiniteScroll with scroll compensation for reverse directions and new options for controlling auto-loading behavior.
Features
useInfiniteScrollβ added scroll position compensation for thetopandleftdirections. When content is prepended (e.g. loading older messages in a chat), the hook keeps the scroll position steady so the viewport no longer jumps.useInfiniteScrollβ added theimmediatelyoption (defaultfalse) that controls whether the hook keeps calling the callback while the content doesn't overflow the viewport. When disabled, the callback fires only on scroll, which is useful for chats or lists with a manual "load more" button where auto-filling isn't wanted.useInfiniteScrollβ added thehasMoreoption (defaulttrue) that stops triggering the callback when set tofalse, so there's no need to guard against extra calls once all content is loaded.
v1.0.0
First big release
We're excited to announce the first release! This initial version ships with a solid foundation of hooks, utility functions, an agent skill, and full documentation.
β¨ What's included
Hooks β 164 ready-to-use hooks to streamline your workflow and handle common patterns out of the box.
Functions β 6 utility functions covering core operations.
Agent Skill β A built-in agent skill to extend functionality and automate tasks.
Documentation β Complete docs to get you started quickly, with usage examples and API reference.
Features
- new hook useCycleList
v0.3.47
Prepare for first release
createContext: Creates a typed context with additional utilities
createEventEmitter: Creates a type-safe event emitter
createReactiveContext: Creates a typed context selector with optimized updates for state selection
createStore: Creates a store with state management capabilities
makeDestructurable: Makes an object also iterable for array-style destructuring
useActiveElement: Hook for tracking the active element
useAsync: Hook that provides the state of an async callback
useAsyncEffect: Hook that triggers the effect callback on updates
useAudio: Hook that manages audio playback with sprite support
useAutoScroll: Hook that automatically scrolls a list element to the bottom
useBatchedCallback: Hook that batches calls and forwards them to a callback
useBattery: Hook for getting information about battery status
useBluetooth: Hook for getting information about bluetooth
useBoolean: Hook provides opportunity to manage boolean state
useBreakpoints: Hook that manages breakpoints
useBroadcastChannel: Hook that provides cross-tab/window communication
useBrowserLanguage: Hook that returns the current browser language
useBrowserLocation: Hook that returns reactive browser location state with navigation controls
useClickOutside: Hook to handle click events outside the specified target element(s)
useClipboard: Hook that manages a copy to clipboard
useConst: Hook that returns the constant value
useContextMenu: Hook that handles custom context menus on desktop and long press on touch devices
useControllableState: Hook that manages both controlled and uncontrolled state patterns
useCookie: Hook that manages cookie value
useCookies: Hook that manages cookie values
useCopy: Hook that manages copying text with status reset
useCounter: Hook that manages a counter
useCssVar: Hook that returns the value of a css variable
useDebounceCallback: Hook that creates a debounced callback
useDebounceEffect: Hook that runs an effect after a delay when dependencies change
useDebounceState: Hook that creates a debounced state
useDebounceValue: Hook that creates a debounced value
useDefault: Hook that returns the default value
useDeviceMotion: Hook that work with device motion
useDeviceOrientation: Hook that provides the current device orientation
useDevicePixelRatio: Hook that returns the device's pixel ratio
useDidUpdate: Hook that triggers the effect callback on updates
useDisclosure: Hook that allows you to open and close a modal
useDisplayMedia: Hook that provides screen sharing functionality
useDocumentEvent: Hook attaches an event listener to the document object for the specified event
useDocumentTitle: Hook that manages the document title and allows updating it
useDocumentVisibility: Hook that provides the current visibility state of the document
useDoubleClick: Hook that defines the logic when double clicking an element
useDropZone: Hook that provides drop zone functionality
useEvent: Hook that creates an event and returns a stable reference of it
useEventListener: Hook that attaches an event listener to the specified target
useEventSource: Hook that provides a reactive wrapper for event source
useEyeDropper: Hook that gives you access to the eye dropper
useFavicon: Hook that manages the favicon
useField: Hook to manage a form field
useFileDialog: Hook to handle file input
useFileSystemAccess: Hook for reading and writing local files via the File System Access API
useFocus: Hook that allows you to focus on a specific element
useFocusTrap: Hook that traps focus within a given element
useFps: Hook that measures frames per second
useFul: Hook that can be so useful
useFullscreen: Hook to handle fullscreen events
useGamepad: Hook for getting information about gamepad
useGeolocation: Hook that returns the current geolocation
useHash: Hook that manages the hash value
useHotkeys: Hook that listens for hotkeys
useHover: Hook that defines the logic when hovering an element
useIdle: Hook that defines the logic when the user is idle
useImage: Hook that load an image in the browser
useInfiniteScroll: Hook that defines the logic for infinite scroll
useIntersectionObserver: Hook that gives you intersection observer state
useInterval: Hook that makes and interval and returns controlling functions
useIsFirstRender: Hook that returns true if the component is first render
useIsomorphicLayoutEffect: Hook conditionally selects either useLayoutEffect or useEffect based on the environment
useKeyboard: Hook that helps to listen for keyboard events
useKeyPress: Hook that listens for key press events
useKeysPressed: Hook that tracks all currently pressed keyboard keys and their codes
useLastChanged: Hook for records the timestamp of the last change
useLatest: Hook that returns the stable reference of the value
useLess: Hook that can be so useless
useList: Hook that provides state and helper methods to manage a list of items
useLocalStorage: Hook that manages local storage value
useLockCallback: Hook that prevents a callback from being executed multiple times simultaneously
useLockScroll: Hook that locks scroll on an element or document body
useLogger: Hook for debugging lifecycle
useLongPress: Hook that defines the logic when long pressing an element
useMap: Hook that manages a map structure
useMask: Hook to apply an input mask
useMeasure: Hook to measure the size and position of an element
[us...