please i how i can test user status before rendring i know how it work for iron router it was like this:
Router.onBeforeAction(function() {
if (!Meteor.userId() && !Meteor.loggingIn()) {
// if the user is not logged in, render the Login template
Router.go('login');
} else {
// otherwise don't hold up the rest of hooks or our route/action function
// from running
this.next();
}
}, {
except: ['login', 'notFound', 'loading', 'register']
});
please i how i can test user status before rendring i know how it work for iron router it was like this:
Please how to do it in Flow router