Hello,
withTracker and async seems weird
export const PageLayoutContainer = withTracker(({}) => {
const logContext = "PageLayoutContainer";
// console.log(logContext, "subscribe('translations')")
let subscriptionTranslations = Meteor.subscribe('translations');
let user ;
// user = await Meteor.userAsync();
let result = {
subscriptionReady: subscriptionTranslations.ready(),
user: user
};
return result;
})(PageLayout)
→ we dont have the user as it is in a async method but the update is passed to PageLayout and the subscriptionReady becomes true at some point.
I switched to async method in the withTracker to get the user, the result is not more updated (subscriptionReady is never changed) but we have the user
export const PageLayoutContainer = withTracker(async ({}) => {
const logContext = "PageLayoutContainer";
// console.log(logContext, "subscribe('translations')")
let subscriptionTranslations = Meteor.subscribe('translations');
let user ;
user = await Meteor.userAsync();
let result = {
subscriptionReady: subscriptionTranslations.ready(),
user: user
};
return result;
})(PageLayout)
Did I miss something ?