VueJS cheat sheet
medium.com
medium.com
One thing I saw was showing how on a button click you can pass an object as an argument. I’ve personally trended away from that pattern and towards always avoiding method calls with arguments in template code. This means creating a sub component which takes in the object in question.
One ends up with a lot more components, but code is really well isolated and it’s incredibly easy to reason about what’s happening.
https://gist.github.com/wjossey/0d7ca1a3c2040e1c376a914941b8...
If you ever did traditiona JavaScript programming earlier in this century, you’ll be familiar with this pattern which is referred to as “callback hell” by some.
If you ever go to use a third party library like Vuetify, the components you use in essence follow the same pattern.
We have 1 directive in our entire application and it's pretty complicated however the use of it is pretty amazing it allows our app to have a straight forward approach to permission allowing to hide/disable elements with good performance.
Honestly I must be super tired since I just re-read it and I see that it's using existing directives instead of creating new ones...