Replies: 2 comments
-
After a few days of using the library, I no longer struggle with the Still to be determined is whether I come to love |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the feedback! That is very helpful :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @jmeistrich, excellent library you've put together. So grateful that you've created and open-sourced this.
I especially love the synced store feature. I was about to build something like your synced store plugins with Valtio before I came across legend-state.
That said, one thing that I love about Valtio is its simplicity. What took me minutes to grok in Valtio, took me hours to grok in Legend. Imo, here are some of the reasons that Valtio feels "simpler":
++state.count
in Valtio vs.state$.count.set((count) => count + 1))
in Legend. I think you noted somewhere that this was done due to footguns in the direct access style, but it is much easier to grokproxy()
->observable() / useObservable()
useSnapshot()
->observer()
+get()
subscribe()
->useObserve()
For a newcomer, it's quite hard to remember which variant of the word "observe" is used for each of these concepts. I think it might make sense to have a larger edit distance between the names of these functions, for the sake of clarity and avoiding typos.
$
suffixes everywhere in the code is intimidating. I understand that this is simply a convention, and from what I gather, it's meant to underscore the distinction between proxy objects and raw objects (which Valtio avoids making you think about because autotracking/direct-style mutations?), but it makes the legend-state example code look less like plain English, and gives the impression that some complex dark magic is happening in the library. Imo, one of the biggest lessons of the success of Python is that making code look more like natural langauge makes it more accessible.Once again, I love what you've built, so I say all of this constructively. This is simply my 2c on some of the noob-unfriendly aspects of Legend-state that I think are worth solving for.
And ofc, assuming that legend-state continues to prove a good fit for my app, I'll look to contribute to this codebase where I can.
Beta Was this translation helpful? Give feedback.
All reactions