How to use reload package for send message when HCP?

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);
  });
});

That’s for package-level control of HCP, not application level.

However, you could look at jamielob:reloader, which should give you what you want.

1 Like