about useProxy and useSnapshot #883
-
Great state library!!! I'd like to ask why there is no description and explanation of useProxy in the official documentation. What's the difference between this usage and usesnapshot seen in many code bases? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
README is the official documentation and describes useProxy. Also #869 is work-in-progress by @ScreamZ. useProxy is based on useSnapshot. If you read the code you will see it's very small. |
Beta Was this translation helpful? Give feedback.
README is the official documentation and describes useProxy. Also #869 is work-in-progress by @ScreamZ.
useProxy is based on useSnapshot. If you read the code you will see it's very small.
I hesitated to recommend useProxy before introducing useSnapshot, because the mental model is still important. Thus,
useSnapshot
is described first and thenuseProxy
.