Adrian Padmodihardjo
1 min readJan 29, 2019


If you meant to access the Vue Instance then,

`this` equals undefined in a lot of different times, e.g. in beforeCreate lifecycle, beforeRouteEnter router hooks.

Also, using `this` in Vue template, like the following:

<div @click=””></div>

…would give a ReferenceError, since `this` won’t ever point to the instance scope. Reason why, if you look at how vue-template-compiler works, you see that Vue passes the instance scope using `with(this){…}` function.

So, `` in above template would simply equals to `this[‘’]`.