Skip to content

How should i use state in callbacks #479

Closed Answered by dai-shi
Slebee asked this question in Q&A
Discussion options

You must be logged in to vote

You can just use the proxy state.

const handleClick = () => {
  ++state.count
}

I hope I didn't misunderstand your question.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Slebee
Comment options

@Slebee
Comment options

@dai-shi
Comment options

Answer selected by Slebee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #478 on June 29, 2022 09:07.