I've been playing with Meteor recently, and one thing I can't wrap my head around is how to publish templates based on a certain condition, before they are sent to the client-side. Example:
<head>
<title>Some partially authenticating app</title>
</head>
<body>
{{> unauthorisedContent}}
{{> authorisedContent}}
</body>
What I want to do is send the {{> authorisedContent}}
template if and only if the client is logged in, and not send it then conditionally and then exclude it based on if (!!Meteor.user())
on the client side. How can this be achieved? Is this also possible using React JS for Meteor instead of Blaze?
This is not currently possible within the same Meteor application. Your two options for addressing this are:
Most people go with option #2.