Setting Meteor.userId() as a reactive var on react



I just switched from blaze to react, and I want to set the

state = {
    isLoggedIn: !!Meteor.userId()

so it will be reactive (= constantly change the state according to if the user is logged in or not and thus change which Components appear (and re-renders if


value’s changes.

I wanted to use mixins but I understand that they are no longer supported. and I’m quite confused: slight_smile:

would love to hear recommendations as to how is best to build it



please read this section of the guide: