#todayilearned

by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

Vue templating gotchas

Posted at — Jun 4, 2019
  • Don’t mix v-for & v-if on the same el; v-for has unexpectedly higher precedence. Instead, move the if to a parent el, and move filters to a computed property (function) for more performant, dependably logical flow

  • Keep complicated logic out of HTML templates and in computed functions.

  • Keep templates declarative!