Some great tips Vaibhav! It's amazing how some of the smallest things can have a big affect on your app.
Another, which is related to v-if, is to be careful when using it along with v-for. v-for will takes precedence over v-if and so if used on the same element, the v-if will be evaluated on every iteration. This can be useful sometimes, but if you want to conditionally load the entire element, it's best to do on an element that wraps the v-for.
All things software & product, honestly - FrontEnd, BackEnd, DevOps, ML - as long as we're solving massive problems.
My code is used by millions of users globally - Potatoes make me happy
That is also an amazing find @james
! I didn't know that - gotta love optimisation, so many little things to look at that collectively affect the overall performance.
Just passed this comment onto my team too! Good stuff!
Good stuff 👍 Did you see Guillaume Chau's performance presentation a couple months back? If not, you're in for a treat 😀 Some really juicy stuff in there!
All things software & product, honestly - FrontEnd, BackEnd, DevOps, ML - as long as we're solving massive problems.
My code is used by millions of users globally - Potatoes make me happy
Some great tips Vaibhav! It's amazing how some of the smallest things can have a big affect on your app.
Another, which is related to
v-if
, is to be careful when using it along withv-for
.v-for
will takes precedence overv-if
and so if used on the same element, thev-if
will be evaluated on every iteration. This can be useful sometimes, but if you want to conditionally load the entire element, it's best to do on an element that wraps thev-for
.Vue actually documents this, though it can be easily missed: vuejs.org/v2/guide/list.html#v-for...
That is also an amazing find @james ! I didn't know that - gotta love optimisation, so many little things to look at that collectively affect the overall performance.
Just passed this comment onto my team too! Good stuff!
Good stuff 👍 Did you see Guillaume Chau's performance presentation a couple months back? If not, you're in for a treat 😀 Some really juicy stuff in there!
vuemastery.com/conferences/vueconf...
Just saw the whole thing! OMG - he's a bloody legend!