Comments (4)
I know how to change it by returning array instead of object, but I can't think of way to make it backward compatible without creating whole new hook.
Also I don't feel comfortable opening PR, as I never done it before..
from rooks.
Sounds good to me!
We should make it return an array to support array destructuring while maintaining backward compatibility with object destructuring.
Would love it if you can send a PR!
from rooks.
It's fine if you are new to it and it's difficult. But you can use my repo as a playground for a PR. I don't mind if it's not the best PR. Most of mine aren't. It's not a compulsion though. :)
from rooks.
It's coming in an upcoming release.
from rooks.
Related Issues (20)
- [V7] Bundled umd does not pass es2015-es2019 checks HOT 4
- Problem with inferring type in useDebounce HOT 2
- [FeatureRequest] change list options of useMultiSelectableList or useSelectableList HOT 1
- Partial imports (typescript) HOT 2
- useSelectableList does not support object list HOT 2
- Cannot separate keys listener in useKeys HOT 1
- Expand HTMLElementOrNull type to include SVGElement HOT 8
- looks like react-hooks.org is down HOT 2
- fix: useKeys never trigger in cypress HOT 2
- [BUG] useLocalstorageState cast undefined to "undefined" HOT 2
- the returned set action from useLocalStorageState does not fully satisfy the Dispatch<SetStateAction<T>> signature HOT 4
- types for useDebouncedValue HOT 1
- stale closure problem with useDebounce HOT 12
- SSR issue with useDimensionsRef HOT 2
- `useDebouncedValue` is not installable as a standalone package HOT 7
- typescript error with useToggle HOT 4
- [BUG] Could not find dependency: 'lodash' relative to '/node_modules/rooks/dist/cjs/hooks/useOnClickRef.js' HOT 2
- [BUG - React 17] react.useSyncExternalStore is not a function HOT 2
- `useDocumentTitle`: error when import noop from lodash
- useLocalStorageState overrides local-storage item HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rooks.