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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -