The idea of reactivity doesn’t exist in this form on the server, so something like the Tracker is not an option. Fortunately though there is the onReconnect
callback you can use. You can steal the required logic from my meteor-serversync
package:
const connection = DDP.connect(URL);
connection.onReconnect = function() {
console.log("(re)connected");
if (!initialized) {
options.onConnect && options.onConnect();
}
};
CLICK HERE to find out more related problems solutions.