Skip to content
Advertisement

Tag: metamask

Variable declared in data() is Undefined in Listener

I am declaring a “userid” variable in the data() section of my component. Within a mounted() method, I am initiating a listener for MetaMask. Upon changing account in MetaMask this listener is triggered. However, the “userid” (declared in data()) within the listener is undefined. How can I solve this problem? Answer Vue runs in strict mode. That means that this

Square Brackets for String in Javascript [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I do not understand why I need to add square brackets around the “account” variable below, for the “accounts” variable constitutes a string. Answer From

Advertisement