DEV Community

Discussion on: What is "this"? Why you should avoid arrow functions on Vue methods

Collapse
 
iamschulz profile image
Daniel Schulz

If it works for you, then great :) I'm not telling you to refactor your entire codebase.

this is context aware and changes its meaning depending on its scope. That's inherently hard to read and understand.
Scope is also a problem that gets simpler with arrow functions, because they inherit their parent scope and don't create their own.
The point in giving up this is writing more readable code.