usehooks
usehooks copied to clipboard
A collection of modern, server-safe React hooks – from the ui.dev team
I wanted to make a PR but I don't know how Gatsby works so I figured I can leave the code here and let you decide if you'd like to...
A hook that is a variant of the [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer) hook that persists its state to [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). ```js import { useReducer, useEffect } from 'react' // Usage const initialState = {count:...
Adding the useKonamiCode hook
#### The init value of `useLocalStorage` is not actually saved to localStorage! ```jsx import { useLocalStorage } from 'use-hooks' export const randomHash = () => Math.random().toString(36).substr(2, 9) const MyComponent =...
First I'd like to thank you for this website. It's really handy to check available hooks that I can use in my projects. The list of hooks has grown since...
There are a few component solutions for this but might it be useful to have a hook? Interested to get peoples thoughts. Happy to help out with an example of...
React hook for updating the document-title ```jsx import useDocumentTitle from '@rehooks/document-title'; function MyComponent() { useDocumentTitle('Page Title'); return ; } ```
Hi, I noticed that you have a lot of recipes inside the website. I think it will be great if you could add index/table of contents at the top of...
`React Hook useEffect has missing dependencies: 'getSize' and 'isClient'. Either include them or remove the dependency array. (react-hooks/exhaustive-deps)`
This hook could be used for setting a className on a component for a short time or simply delaying some action on mount. ```javascript import { useEffect, useState } from...