ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Got an idea for a new React Hook for this org, start here

Results 42 ideas issues
Sort by recently updated
recently updated
newest added

- https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent ```js useWindowMousePosition() // { x: number, y: number } ```

claimed

Check if user is idle. ```js import useIdle from "@rehooks/idleMonitor" function MyComponent() { const [isIdle, resume, pause] = useIdleMonitor(); return ( {isIdle && you are idle} Pause idle monitor Resume...

``` const useConfirm = text => { const [did, setDid] = useState(false) const [show, setShow] = useState(false) useEffect(() => { if (show) { setDid(confirm(show)) setShow(false) } }, [show]); return [did,...

A simple hook to get position of a element ``` function App() { let ref = useRef(null); let { left, top } = usePosition(ref); return ( Hello Hooks: {JSON.stringify({left, top})}...

``` import subscribe from 'callbag-subscribe'; import { useEffect, useState } from 'react'; export default function useCallbag(factory) { const [state, setState] = useState(); useEffect(() => subscribe(setState)(factory()), []); return state; } ```

A hook to display a countdown from a given time in the future. ```jsx function MyComponent() { const {days, hours, minutes, seconds} = useCountdown(() => Date.now() + 99999999); return (...

I'll be working on this in this repo https://github.com/juancuiule/socket using socket.io to emit/receive events

https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language ```js const language = useLanguage(); ```

While working on `useClipboard`, I realized a simple `usePaste` might be useful too. https://developer.mozilla.org/en-US/docs/Web/Events/paste ``` const content = useClipboard(dataType = 'text', root = 'document'); ```

Using `useReducer` to create a global state object, store in Context and accessed with `useContext`: ```jsx const MyContext = createContext(); function MyProvider(props) { let [state, dispatch] = useGlobalState(); return (...