Work with React?
Closed this issue · 1 comments
tgoldenberg commented
I would like to use this with React and Meteor (1.3). I have tried let AtForm = BlazeToReact('atForm')
and it does not work. Any suggestions on how to use this package from a React-router / React front-end perspective?
Thanks!
10537 commented
Hello @tgoldenberg, How are you?, maybe this little code can help you.
import React, {Component} from 'react';
import TrackerReact from 'meteor/ultimatejs:tracker-react';
const AccountUI = BlazeToReact('atForm');
export default class AccountForm extends TrackerReact(Component) {
render () {
return (
<div>
<div className="container">
<div className="row">
<div className="col-lg-3 col-md-3 col-sm-4 col-xs-3"></div>
<div className="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div className="login-modal">
<AccountUI/>
</div>
</div>
<div className="col-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
</div>
</div>
</div>
)
}
}