When using $watch, the callback function can't access the current variables #1393
Unanswered
ismailnakkar
asked this question in
5. Bugs
Replies: 1 comment
-
This isn't an issue with Alpine, rather show JavaScript is binding I'm not at my desk right now so can't actually type out a good example, but you either want to forcefully bind to $watch('x', () => print()) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For instance, the console.log in the following prints undefined after changing the value of x:
Beta Was this translation helpful? Give feedback.
All reactions