react-use
react-use copied to clipboard
React Hooks — 👍
# Description Closes #2505 Bugfix to solve a problem with useMeasure when used in the same component as Suspense. The fix consists in using useRef instead of useState to track...
**What is the current behavior?** On using `useMeasure` it is giving the below error with React18 (with server side rendering) `Error: This Suspense boundary received an update before it finished...
# Description Added a new hook useObjectArray with many utility functions that is available to be used at all places where we have an array of objects. ## Type of...
I have a case where a popover is supposed to be closed when I click anything outside the popover. The button which triggers the popover also works as a toggle,...
please add lazy initialization like in useState hook ```ts // useState const [state, setState] = useState(() => { const initialState = someExpensiveComputation(props); return initialState; }); // useSetState const [state, setState]...
# Description ## Type of change - [ ] Bug fix _(non-breaking change which fixes an issue)_ - [x] New feature _(non-breaking change which adds functionality)_ - [ ] **Breaking...
I realized `useWindowSize` returns the window's `innerWidth` which includes the scrollbar's width, if present, but also that I could use `useScrollbarWidth` to subtract it. Why not add an `innerWidth` (and...
Any server rendering solution won't have access to a browser's local storage, so it will default to the `initialValue`. Since `useLocalStorage` will use the actual local storage value on first...
**Is your feature request related to a problem? Please describe.** To see examples for usage of a particular hook one needs to come to this repo taking them out of...
**What is the current behavior?** If a container's descendant element target no longer exists, the useClickAway callback will still be invoked when listening for the "click" event. This does not...