3 ms·
Show HN: Luciex – A small simplistic state management library
- Everlag 6y agoThis 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/src/components/atom.ts https://github.com/lucialand/luciex/blob/main/packages/core/...
- t0astbread 6y agoYou could copy atom.ts and save yourself 5 minutes
- dkjaudyeqooe 6y agoOfftopic, 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.
- shadowtime2000 6y agoOh, didn't know that. Thanks!
- mauroc8 6y agoI 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?
- mauroc8 6y agoAlso, 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).
- zaphirplane 6y agoSeems You signed up to say that, now that is passion
- KnobbleMcKnees 6y agoIf 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.
- deleted 6y ago[deleted]