about useProxy and useSnapshot #883
Answered
by
dai-shi
zhangfanhang
asked this question in
Q&A
-
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.
Answered by
dai-shi
Apr 8, 2024
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.
0 replies
Answer selected by
zhangfanhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.
I hesitated to recommend useProxy before introducing useSnapshot, because the mental model is still important. Thus,
useSnapshot
is described first and thenuseProxy
.