Arrow functions are not independent, as a result, they cannot define a ‘this’ of their own. But instead, the arrow functions are bound to their parent’s function’s context.
In a situation where the arrow function (=>) is used in the Vue app, the keyword ‘this’ does not bind to the Vue instance and therefore, resulting in errors.
For that reason, it is highly advised to use the standard function declaration instead of the arrow function.
Posted Date:- 2021-09-07 22:31:46