You should use fast-render
package. It makes Meteor.user()
to be populated from the start. Simply run:
mrt add fast-render
Check out this detailed article on how it works.
Question
I am logged into my website with accounts-facebook. When I load a page, onBeforeAction is called, and Meteor.user() is undefined. It loads the login template, and I see it briefly. Then onBeforeAction is re-run, and Meteor.user() is an object, and a different template is loaded. How do I either:
Solution
You should use fast-render
package. It makes Meteor.user()
to be populated from the start. Simply run:
mrt add fast-render
Check out this detailed article on how it works.