react-use
react-use copied to clipboard
React Hooks — 👍
```JS import { useLocalStorage } from 'react-use'; const Demo = () => { const [value, setValue] = useLocalStorage('my-key', 'foo'); return ( Value: {value} setValue(prev => { // prev value is...
# Description This PR adds a new React hook: useBroadcastChannel. This hook allows the usage of the Broadcast Channel API in the application to send and receive messages. It can...
# Description ## Type of change - [ ] Bug fix _(non-breaking change which fixes an issue)_ - [x] New feature _(non-breaking change which adds functionality)_ - [ ] **Breaking...
**What is the current behavior?** Error `window is undefined` is thrown` **Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much...
**What is the current behavior?** ```` const [state, copyToClipboard] = useCopyToClipboard(); function handleClick() { copyToClipboard('hello world') } ```` calling `copyToClipboard` changed the state, but it doesn't really change the actual...
**What is the current behavior?** I want to create a shortcute `command + p` on macos, but not sure how to create it with this lib, I tried several things,...
**What is the current behavior?** when click make step second time, history stack has four state records, expect three state records including the initial one state. **Steps to reproduce it...
# Description 1. Updated useClickAway Hook: • The useClickAway hook was enhanced to accept either a single RefObject or an array of RefObject[]. • The hook now checks if the...
**Is your feature request related to a problem? Please describe.** For my use case I have a button that opens a modal. Once the modal is open, I want clicking...
# Description The `useMediatedState` hook mimics the React `useState` hook’s return value, which means that `setState` expects either a _value_ or an _updater function_. This creates a problem as the...