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

How to check data type in C++? -

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

sql server - SQL Query returns one result, does not return 0 or NULL result -