In web, asking the user explicitly to trigger the update when a new bundle is available?

In Cordova apps, we have a way to tell the user that a new update is available and the user can explicitly trigger the update. This minimizes the issue that the user is in the middle of doing something (e.g. editing a form), then an update happens and the app refreshes by itself.

In web, all we have now is a notice that data might be lost during the refresh. But that feels like a patch up and not solving the real problem. And the real problem is that the app refreshes by itself without the user initiating it while using the app

Any solution out there for Meteor?

You can hook Reload from meteor/reload package.

import { Reload } from "meteor/reload";

Reload._onMigrate(() => {
        // do something

        // disables automatic refresh 
        return [false];

Take a look at the source code of my simple React component which notifies user about update and user can click on refresh:


Nice. I’ll just use your package :tada:

1 Like