reactjs - Send Meteor Template to client on condition -


i've been playing meteor recently, , 1 thing can't wrap head around how publish templates based on condition, before sent client-side. example:

<head>     <title>some partially authenticating app</title> </head> <body>     {{> unauthorisedcontent}}     {{> authorisedcontent}} </body> 

what want send {{> authorisedcontent}} template if , if client logged in, , not send conditionally , exclude based on if (!!meteor.user()) on client side. how can achieved? possible using react js meteor instead of blaze?

this not possible within same meteor application. 2 options addressing are:

  1. have separate application authorized content versus unauthorized content.
  2. ensure you're not publishing data unauthorized users happen figure out how authorized content template show up.

most people go option #2.


Comments

Popular posts from this blog

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

Why does PHP consider 0 to be equal to a string? -

formula - R: how to pass in a reference to the variable in glm or lm? -