Last active
October 17, 2016 09:18
-
-
Save dkmin/1b21b55685d4456789bcf1b5c56e7253 to your computer and use it in GitHub Desktop.
imports/ui/AccountsUIWrapper.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { Template } from 'meteor/templating'; | |
| import { Blaze } from 'meteor/blaze'; | |
| export default class AccountsUIWrapper extends Component { | |
| componentDidMount() { | |
| // Use Meteor Blaze to render login buttons | |
| this.view = Blaze.render(Template.loginButtons, | |
| ReactDOM.findDOMNode(this.refs.container)); | |
| } | |
| componentWillUnmount() { | |
| // Clean up Blaze view | |
| Blaze.remove(this.view); | |
| } | |
| render() { | |
| // Just render a placeholder container that will be filled in | |
| return <span ref="container" />; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment