Meteor update notifier for React projects

Hi everybody!
I have made a new package for meteor, which allows you to notify your client that you have deployed new app version and the page needs to reload.
When you deploy meteor app, a client page automatically reloads, it can cause troubles if:

  1. Your client is doing something, and he needs to complete his job and after then refresh the page
  2. You want to notify your client that the page will reload in seconds

This package is simple and easy, 40 LOC,

Install

meteor add kschingiz:meteor-react-update-notifier

Usage

import React from "react";
import MeteorUpdateNotifier from "meteor/kschingiz:meteor-react-update-notifier";

class App extends React.Component {
  render() {
    return (
      <MeteorUpdateNotifier>
        <div>
          <h4>New Version is available, do you want to reload?</h4>
          <input type="button" value="Update" onClick={this.onUpdate} />
          <input type="button" value="Not yet" onClick={this.hide}/>
        </div>
      </MeteorUpdateNotifier>
    );
  }
}

atmosphere and github pages

Atmosphere: https://atmospherejs.com/kschingiz/meteor-react-update-notifier
Github: https://github.com/kschingiz/meteor-react-update-notifier/

2 Likes