-
"We shouldn't use snapshots in callbacks, because snapshots can be stale there." so. how should i use state in callbacks? |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Jun 29, 2022
Replies: 1 comment 3 replies
-
You can just use the proxy state. const handleClick = () => {
++state.count
} I hope I didn't misunderstand your question. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Slebee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just use the proxy state.
I hope I didn't misunderstand your question.