Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Luciex – A small simplistic state management library (github.com/lucialand)
19 points by shadowtime2000 on Nov 30, 2020 | hide | past | favorite | 8 comments


This labels itself small but, honestly, it feels too small. Why would I introduce a dependency that I can implement in 5 minutes from first principles?

The entire implementation essentially lives in atom.ts[0]. Its a class that has an array member and a for loop. It does handle async code for you but, I don't know, I'm not convinced.

I would love to know the intended audience for this package, since its seemingly not me.

[0] https://github.com/lucialand/luciex/blob/main/packages/core/...


You could copy atom.ts and save yourself 5 minutes


Offtopic, but a pet peeve: simplistic doesn't mean "having the qualities of, or relating to, being simple" as many people seem to think, it means something much more negative: "treating complex issues and problems as if they were much simpler than they really are" with the synonyms "facile, superficial, oversimple, oversimplified; shallow, jejune, naive."

Maybe that's intentional, but I'm not sure why someone would want to give their work that kind of connotation.


Oh, didn't know that. Thanks!


I loved it immediately. If you use typescript, you get type-safe actions for free! (Without having to define all your action tags, ugh).

Please, include in the readme more documentation! How do I subscribe to an Atom? Why call it an Atom instead of a Store or State? Can I read the current value of an Atom? How?


Also, what do you mean by "chainable interface"? I was expecting a `flatMap` method when I read that (luckily I was wrong, it would be a bad idea).


Seems You signed up to say that, now that is passion


If the intention of the README was to leave us wanting, they succeeded!

+1 for some more docs, I'm a sucker for libararies that do-one-thing-well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: