alexjoverm / v-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
605 stars 72 forks source link

Template is re-rendered every time the parent date changes #64

Open yellow1912 opened 4 years ago

yellow1912 commented 4 years ago

I'm not sure if this is intentional, but the template is re-rendered every time the parent data changes (understandably). This causes the components inside the template to be re-created again and for certain edge cases this can be undesirable.

Perhaps this should be added as a note some where if not already.

SikoSoft commented 4 years ago

For certain cases it can also cause an infinite loop.

There seemingly is no reactivity logic in this library. It just airs on the side of "always update", rather than trying to intelligently determine if that is relevant. :(

liho00 commented 3 years ago

v-once should be solve this see: https://vuejs.org/v2/api/#v-once