I am trying to retrieve if a user is logged in within a Polymer component without Blaze. I am trying to show different content based on whether user is true or false. However I can’t seem to get reactive updates on the user with something like:
var user; Tracker.autorun(function () { user = Meteor.user(); }); return user;
It seems like tracker wouldn’t run when defined in a property via a function (not sure if that’s because how properties are defined in Polymer or an incompatibility Polymer/Meteor). So instead of defining a function within the loggedIn property that ran tracker I instead am running it once the component gets attached.