accounts-password
; useraccounts:core
gadicc:blaze-react-component
to render the {{> atForm }}
template in my react component =><Blaze template="atForm" />
I don't know what should be the proper syntax to secure a specific page as described in the useraccounts guide but with react.
Lets suppose that I want to secure <Mypage />
imported from './mypage.jsx'
How can I call {{> ensureSignedIn template="myTemplate"}}
and reaplace "myTemplate" by <Mypage />
?
I tried <Blaze template="atForm" template={Mypage} />
without success...
Is it even possible to make something like this ?
I found a solution:
With kadira:flow-router
Meteor's package, using react-layout
and useraccounts:flow-routing
, I can do something like that:
FlowRouter.route('/private', {
triggersEnter: [AccountsTemplates.ensureSignedIn],
action: function() {
ReactLayout.render(Mypage, {myprops: myprops.value});
}
});
It seems that it all happens into triggersEnter: [...]
key.
More details here.