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:
- have separate application authorized content versus unauthorized content.
- ensure you're not publishing data unauthorized users happen figure out how authorized content template show up.
most people go option #2.
Comments
Post a Comment