Components try to render before roles available


Hey Team -

I recently migrated my app over to the new 1.3 structure as defined by new guide and I am now running into a new error with components that do a Role check to determine their behavior (think menu items, access to private routes, ect)

The issue is that while Meteor.userId() returns a valid _id for the logged in user, but Meteor.user() and therefore the roles are not yet available.

I know this is a typical problem with subscriptions (foo isn’t ready, so load a temp page and when the subscription is loaded display bar), but I haven’t encountered it with the roles package yet and I am hoping there is a simpler way of handling it rather than wrapping each component that looks at the role.

Interestingly, this problem occurs when I am on public routes and then try to browse to private one… I wouldn’t think there would be a need to reload the user subscription, but maybe I’m missing something.

Has anyone encountered a similar issue before?

ps - I am using react for the ui