DEV Community

Discussion on: Can React state management get any simpler than this?

Collapse
 
avkonst profile image
Andrey • Edited

"hijacking?"
No, I expressed my opinion on the asked question if it can be any simpler.

"so I guess you didn't bother to look."
I looked at this.

"Why would you do that (use the same function name)???"
Because whatever the argument is, it gives you back the State object, which has got the same functionality regardless if a state variable comes from local variable, global variable, if it is a Promise or not.

" it overrides useState"
It does not override it. It just have got the same name because it does the same (for the case of the local state). If it is no-no, there is an alternative name 'useHookstate' or you can name alias on import or you can use module prefixes.

"different output type for async state"
No, you are not right with this statement. It is still an object of the same type with the same API and functionality.

"After that, I looked elsewhere sorry."
Good on you. I am quite glad you moved.

"I just objectively say why I didn't pick up HookState."
I got you objection comments on board. Thanks
Here is another view on Hookstate by someone else, who actually see it valuable: areknawo.com/top-5-react-state-man...

"stop promoting your own library in discussions that talk about another library"
Thanks for the advise. I hope you will take the effort to put down similar promotions everywhere around the internet? or maybe start with this article...
People pointing out to so many other alternatives all over the place. Many people said me "Thank you for the awesome library" after going to it from a "promotion" comment like this. So, I guess if there were no "promotional" comments people would not discover it and some of them would not get the tool which solves a real problem for them and makes them happy. I guess if I had a twitter account with millions of subscribers like some other "more well known" libraries use, I would not need to comment anywhere or even pay attention to comments like yours. At the same time I am a developer and prefer to write code, instead of developing marketing presence and twitter accounts. The tool I published solved a problem for me (no other state management library, I am aware of, solves the problem of performance of frequent deeply nested large state updates). I published it with the hope it makes life easier for somebody else too. And it did. I appreciate many will not bother even to look at it, because it does not come from Facebook or alike. But a few will and do use it, and it is enough.

Thread Thread
 
robvirtuoso profile image
robvirtuoso • Edited

I thought it prudent to repost here what I wrote in response to another conversation with you elsewhere... so that I may be completely fair to you. I do appreciate the effort you put into your library and for maintaining a good demeanor despite criticism.

---- Repost starting from here ---

I'm not trying to antagonize you. I just hate the idea that independent open source contributors like you will get a bad reputation due to their posts like this. I find publishing open source libs a noble thing to do, especially for people who don't earn a dime from it. You seem like you belong to this category, so I appreciate your efforts. I actually help promote work of libs that I personally use, as a way of giving back to the author/maintainer. If your posts triggered a bad reaction from me, it may happen with others too. So again I wouldn't wish you that misfortune.

You may not be asking for advice from me, but if it was me I would not want people thinking that I'm doing this to compete with the big guys (Redux, Recoil, etc.) which are backed by a big corporation and fanboys... And nor would I ever say that my lib is superior to another , popular or new one.... open source is not a popularity contest after all. As long as a number of people actually use your library, i.e. it is helping some folks out there, it means you already are doing a good job.