3 ms·
Hi everyone! You old heads may remember the original usehooks. It was built when hooks were first released in 2019. We just rebuilt it from scratch, added abou
by tylermcginnis 3y ago
Hi everyone!
You old heads may remember the original usehooks. It was built when hooks were first released in 2019. We just rebuilt it from scratch, added about 40 more hooks, made it compliant with Server Components, and launched it as a standalone lib.
Hope you all enjoy!
- morley 3y agoAre all the hooks on the site made by ui.dev? It'd be great if each hook linked to the Github code for that hook, as the first thing I thought of was (a) what is the hook doing, and (b) is it easier to adapt my existing hook and reduce the number of dependencies I have to track?
- benadam11 3y agohttps://github.com/uidotdev/usehooks/blob/main/index.js https://github.com/uidotdev/usehooks/blob/main/index.js
- tylermcginnis 3y agoGood feedback. Yes they're all up on Github – https://github.com/uidotdev/usehooks https://github.com/uidotdev/usehooks
- psnehanshu 3y agoI haven't tried the package yet, but at first glance it is missing the .d.ts file. Is this package type safe?
- jackdh 3y agoLeft another main comment, however you may not see it, where is useLocalStorage implementation for example?
- tuukkah 3y agoI see "MIT" in package.json - could you add a proper license file to the repo?
- tylermcginnis 3y agoMissed that. Thank you. https://github.com/uidotdev/usehooks/blob/main/LICENSE https://github.com/uidotdev/usehooks/blob/main/LICENSE
- benatkin 3y agoWas this inspired at all by VueUse? After the windicss/tailwind and Remix/Next.js scuffles it's become clear that it's good to get acknowledgement. Either way, I hope it's as well documented and well maintained as VueUse. That has been pretty sweet. I wanted something like it for React a few months ago and useHooks was the closest thing I found but not nearly as good. Hopefully this relaunch will be.
- tylermcginnis 3y agoI've never heard of VueUse (though I'm sure it's great). The original useHooks was released in January of 2019.
- benatkin 3y agoYeah, I figured useHooks was created without knowing about VueUse, but thought the useHooks maintainer(s) might have become aware of it sense then. It makes sense, because though the code is heading in the direction of VueUse in terms of being maintained and well rounded, the structure of useHooks is quite a bit different. VueUse has the code alongside the Markdown: https://github.com/vueuse/vueuse/tree/main/packages/integrations/useFuse https://github.com/vueuse/vueuse/tree/main/packages/integrat...