Hello,
I’m trying to display a message for the user when my app have new files and in Hot Code Push.
But I can not use the meteor / RELOAD package.
Does anyone have a solution?
I tried this but it did not work:
import { Reload } from 'meteor/reload';
Template.pag_home.onCreated(function () {
this.newVersionAvailable = new ReactiveVar(false);
});
Template.pag_home.helpers({
hotCodePush: function(){
// return true;
return Template.instance().newVersionAvailable.get();
}
});
Template.pag_home.onRendered(function () {
Reload._onMigrate(function (retry) {
Template.instance().newVersionAvailable.set(true);
});
});