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 124 usehooks issues
Sort by recently updated
recently updated
newest added

I did follow the documentation at https://usehooks.com/usekeypress ``` typescript import { useKeyPress } from "@uidotdev/usehooks"; ``` But TypeScript says this: ``` Module '"@uidotdev/usehooks"' has no exported member 'useKeyPress'.ts(2305) import useKeyPress...

Currently `useMap` seems to have been copy-pasted from `useSet` and its type signature does not allow setting map value type, and the initialValues type is straight up incorrect. This adds...

The [example](https://usehooks.com/useobjectstate) provided doesn't work. The setter can take either the object or a function but the type only allows the object. ```ts setStats((s) => ({ wins: s.wins + 1,...

Shouldn't this be tested? surprised so many stars but no tests...

Currently, when we want to update the state with the `useHistoryState` hook, we are unable to use the same pattern `useState` provides, where the previous state is passed into the...

### I'm using useMediaQuery hook from @uidotdev/usehooks. My parent component is a client component then this error also occurs. ⨯ Error: useMediaQuery is a client-only hook at DashboardLayout (./src/app/dashboard/page.tsx:35:92) digest:...

Previously, the TypeScript declaration for `useThrottle` did not reflect the actual default value of the `delay` parameter. This fix ensures that the default value (`500ms`) is correctly represented in the...

Example of how to do this outside this hook. Would be nice to use this hook and be able to pass multiple formats. ```ts const plainText = "Hello, this is...

navigator.geolocation.clearWatch is not a function please fix this bug