Using ES6 arrow functions in Vue modules
Check out some examples on how to improve your code with ES arrow functions. Writing Vue modules and using ES6 features can improve and clean up your code.
Here are some tips by Jacob Bennett.
Vue ES6 Conventions
- Use method definitions for all “top level” methods.
- Use arrow functions for any callbacks inside “top level” methods.
- Use an arrow function with a “concise body” for component data closures.
See how to implement arrow functions, method definitions, some good tips, and more, here.
Also, check out When 'not' to use arrow functions.