Skip to content
Discussion options

You must be logged in to vote

count is updated by (re)assignment (which is the basic form of reactivity) so the DOM will update when count is (re)assigned. doubled is not reassigned so the DOM won't know it has change.

Either you reassign doubled inside handleClick or you put some sort of --watch flag on count so that every time it changes, it triggers a reassignment of doubled. $ is a shorthand for "please reassign doubled when any variable inside the reactive statement has changed"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mmailaender
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