What's the state of useProxy
?
#832
Replies: 3 comments
-
Sorry for the confusion. (If anyone is interested in contributing. Please let me know.) |
Beta Was this translation helpful? Give feedback.
-
It does. It's still the same as useSnapshot. If you mean, you don't want the auto-tracking snapshots, you can manually subscribe to valtio proxies: |
Beta Was this translation helpful? Give feedback.
-
Note that proxyMap from valtio/utils is not for performance. It's just an emulation using plain objects. So, if you can use plain objects instead, it would be simpler and more predictable. |
Beta Was this translation helpful? Give feedback.
-
Hey, I have spent several hours reading issues and discussions while trying to accumulate as much information as my brain can handle to figure out if I want to try out useProxy. As the result, I have not decided yet. And as I noticed an unsettling amount of people being unsatisfied with the separation of read/write, where read is useSnapshot, obviously, I wanted to ask:
Also, I was excited to use proxyMap from utils module, however I ran into webpack issues in my Next app while using .get() function. And the reason why I justified using map instead of array is not performance (like the majority say), but rather the fact that I need key+value entity. So I wanted to know, if I am recommended to use proxy object, not map, as I am not driven by benefiting from map's performance (array sucks in my scenario because all entries are unique and have ids)
Kiss 💋
Beta Was this translation helpful? Give feedback.
All reactions