Which code will correctly detect whether a user is authenticated or not?
Which code will correctly detect whether a user is authenticated or not?
Correct Answer: var loginRun; Template.bar.rendered = function() { loginRun = Deps.autorun(function() { if(Meteor.user()) { //Stuff to run when logged in } }); } Template.bar.destroyed = function() { loginRun.stop(); }
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Meteor - JavaScript Web Framework Skill Assessment
More Meteor - JavaScript Web Framework MCQ Questions
Meteor - JavaScript Web Framework Skill Assessment