usehooks icon indicating copy to clipboard operation
usehooks copied to clipboard

A collection of modern, server-safe React hooks – from the ui.dev team

Results 106 usehooks issues
Sort by recently updated
recently updated
newest added

Hello, I tried to use the useMediaQuery hook from your library (btw good job with creating so many useful hooks) import { useMediaQuery } from "@uidotdev/usehooks"; Over the components we...

``` const [number, setNumber] = useLocalStorage("number", Infinity); console.log(number); // null ``` Seems to be related to JSON.stringify. You can workaround this issue by not using Infinity but it would be...

When the component using this hook is mounted below the current cursor position, the returned state is false when it should be true. On the hook's page, there is a...

I have a `SideMenu` component, that should be closed when clicking outside of it, and a `NavBar` component with a button that toggles the `SideMenu`. When the `SideMenu` is open...

useBattery hook is throwing null for everything, when I am using running the nextjs app with local net workwork `npm run dev -- -H ` ## Code ```tsx import {...

when using the useDebounce hook with anything other than a primitive string or number, an infinite render loop is triggered. to reproduce, use for example an array: ```js let rendercount...

This PR refactors the existing useHistoryStateReducer function by replacing the if-else statements with a more concise and readable switch-case statement. The new implementation enhances code clarity and maintainability, making it...

Removes obsolete type definitions around useSpeech hook, which was removed in 2.2.0. Fixes #297

Typescript is telling me there are declared methods in `@uidotdev/usehooks` @2.4.1 that are not available in implementation. Specifically, index.d.ts declares useSpeech, which was removed from index.js in ea634b32d7cbd8b55cd5b732c8d01155d16dc15d between 2.1.1...

Hi, When I use `useWindowScroll`, ```` useEffect(() => { scrollTo(0, 0); }, [scrollTo]); ```` The compiler says "Expected 1 arguments, but got 2.". Effectively, the index.d.ts is incorrect : ```...