Why is Meteor.user() so slow in react?

It’s very slow, when I use Meteor.user().username, it returns undefined at first and then returns the true value after a few seconds. With react router, I don’t know any ways to wait for Metetor.user() thought,… So is there an solution for this, to actually force react router to wait for Meteor.user() before rendering things?

This is likely due to network latency. A very simple solution to this would be to simply run meteor add meteorhacks:fast-render. This will send down the logged in user with the initial payload and will make it available as soon as the page renders.

1 Like