Example for stopping Composition API watcher seems odd #2236
-
I wanted to ask first, because maybe it is just me not understanding it, but I can't get into this sample code for stopping a watcher in Composition API: Either I don't need to instantiate |
Beta Was this translation helpful? Give feedback.
Answered by
skirtles-code
Feb 19, 2023
Replies: 1 comment 1 reply
-
I don't understand the question. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AloisSeckar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't understand the question.
unwatch
is a function, you invoke it usingunwatch()
. The nameunwatch
is arbitrary, as it's just a local variable name being used to hold the function returned bywatchEffect
. I'm not sure why you think it's weird or unclear.