-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccounts.jsx
27 lines (26 loc) · 903 Bytes
/
accounts.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// AccountsUIWrapper React component - represents the accounts UI
AccountsUIWrapper = React.createClass({
/**
* React's componentDidMount method, invoked once, only on the client,
* immediately after the initial rendering occurs
*/
componentDidMount() {
// Uses Meteor Blaze to renders login buttons
this.view = Blaze.render(Template.loginButtons,
ReactDOM.findDOMNode(this.refs.container));
},
/**
* React's componentWillUnmount method, invoked immediately before a component
* is unmounted from the DOM. Performs any necessaty cleanup, such as
* invalidating timers or cleaning up any DOM elements that were created in
* componentDidMount
*/
componentWillUnmount() {
// Cleans up Blaze view
Blaze.remove(this.view);
},
// Just renders a placeholder container that will be filled in
render() {
return <span ref="container" />;
}
});