web
web copied to clipboard
React hooks done right, for browser and SSR.
`useRetain`: useMemo but with a callback to check that factory fn can be invoked
## What new hook does? Functions like `setTimeout`, except in hook form. Returns a method to cancel the timeout, and a method to restart the timeout. It does not cause...
## What new hook does? New hook inspired by react-use's `useCopyToClipboard`, copies some text to clipboard. It returns an array composed as follow: - a `copyState` that reflects copy process...
## What new hook does? ## Checklist - [x] Have you read [contribution guideline](../../CONTRIBUTING.md)? - [x] Does the code have comments in hard-to-understand areas? - [ ] Is there an...
## What new hook does? ## Checklist - [x] Have you read [contribution guideline](../../CONTRIBUTING.md)? - [ ] Does the code have comments in hard-to-understand areas? - [ ] Is there...
### What is the new or updated feature that you are suggesting? It would be useful if hooks were provided as default exports when importing directly from a given file....
## New Features `useDeepCompareMemo` hook ### What is the new or updated feature that you are suggesting? A deep compare version of `useMemo` ### Why should this feature be included?...
Our goal with `@react-hookz/web` is to give the react community a general-purpose React hooks library built with care. We'd like to port the remaining hooks from [react-use](https://github.com/streamich/react-use) (the project `@react-hookz/web`...
When I try to import `useCookieValue` from `esm` or `esnext` it fails with error `SyntaxError: Cannot use import statement outside a module` ```ts // works import { useCookieValue } from...