Closed vfonic closed 3 years ago
That is actualy the only reason I'm not using this project and star it. I don't add an abnormal installation step for a single dependency or copy & paste code, better to reuse properly
Thanks for the feedback guys.
I think there are very good packages for hooks, well tested and with a ton of hooks (e.g. react-use
).
So, my initial goal here wasn't do the same, but just giving some simple code as well for understanding purpose and to speed development too. My opinion is if I only need a pair of hooks, I prefer copy/paste there from a confidence source and keeping things simple.
I'm not a huge fan of packaging everything (cf: is-odd
seems like a joke).
If you want to package some hooks from this project, here or somewhere else, feel free to do what you want.
The truth, I'm not really closed to package it, it may be a good idea too. I will consider it 👍
To be fair to, now archived, is-odd package from 2014, copy-pasting code snippets in 2021 seems like a joke. What if you realize there's a bug in one of the hooks? What's easier: copy-pasting the new code snippet hook in every project that uses that hook or updating the package via npm? How would you inform the other developers, users of the hook with a bug that there's a bug? Should they check this repo regularly? Isn't there a faster way to check for updates?
What's faster?
npm i useHooks.ts
import { useBoolean } from 'useHooks.ts'
or
cd
into it)useBoolean.ts
file (either on GitHub or locally)Sorry for mini rant. I thought that since you put so much effort in creating all these hooks and the documentation website, it's such a shame that people like myself and @bclermont and others don't get to use it because of the last 1% needed to publish this. If you've never published a package this is a great opportunity to experience the whole process.
Thank you mate, you're right. I will do it
You sir are a legend! 🚀 Thanks for the great work you've put into this!
EDIT: Unrelated, I figured that the link to your GH profile doesn't work in the footer of your portfolio website.
Oh man, good catch, thanks! 👏
As this issue had been closed, where is the package?
I re-open the issue as long as the branch isn't merged on master. It's coming soon
It's early stage, but it's now available on npm!
You just got featured all over the place! 🎉 I've seen the link to this npm package in at least two newsletters. :)
I hope it doesn't come with too many issues, but hopefully we all benefit from bugs found and new contributions.
This great repo sounds like a great candidate for publishing on npm for easier updating and security auditing. If someone knows how to set it up, it could also support tree shaking, since each of the hooks is in its own file.
What do you think?