You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use collections/cursors with defined transform() function to transform raw documents to class instances. Normally, this function is executed when a document is fetched for the 1st time or updated. But with vue-meteor-tracker it's re-executed for all matching documents if one of them has been changed. Please, take a look at the code:
<template><main><divv-for="note in notes">
{{ note.text }}
</div></main></template>
// server.jscreate7Notes()// laterupdateSingleNote()// => 7 'transformed' messages in the browser
As you see, each note is transformed again even if it wasn't updated. That might be a problem for the large datasets. I tried the same scenario in Blaze using {{#each .. in}} helper and everything works as expected: transfom() is re-executed only for the updated document.
Is this an expected behavior for vue-meteor? Is there a way to change it?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Hello!
I use collections/cursors with defined
transform()
function to transform raw documents to class instances. Normally, this function is executed when a document is fetched for the 1st time or updated. But withvue-meteor-tracker
it's re-executed for all matching documents if one of them has been changed. Please, take a look at the code:As you see, each note is transformed again even if it wasn't updated. That might be a problem for the large datasets. I tried the same scenario in Blaze using
{{#each .. in}}
helper and everything works as expected:transfom()
is re-executed only for the updated document.Is this an expected behavior for
vue-meteor
? Is there a way to change it?Thank you in advance!
The text was updated successfully, but these errors were encountered: